mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 01:26:42 +03:00
Minor patch
This commit is contained in:
parent
ac3f2fd00f
commit
82efb0ca79
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
|||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.5.128"
|
||||
VERSION = "1.3.5.129"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
@ -236,23 +236,8 @@ class Connect(object):
|
|||
the target URL page content
|
||||
"""
|
||||
|
||||
start = time.time()
|
||||
|
||||
if isinstance(conf.delay, (int, float)) and conf.delay > 0:
|
||||
time.sleep(conf.delay)
|
||||
|
||||
if conf.offline:
|
||||
return None, None, None
|
||||
elif conf.dummy or conf.murphyRate and randomInt() % conf.murphyRate == 0:
|
||||
if conf.murphyRate:
|
||||
time.sleep(randomInt() % (MAX_MURPHY_SLEEP_TIME + 1))
|
||||
|
||||
return randomStr(int(randomInt()), alphabet=[_unichr(_) for _ in xrange(256)]), None, None if not conf.murphyRate else randomInt(3)
|
||||
|
||||
threadData = getCurrentThreadData()
|
||||
with kb.locks.request:
|
||||
kb.requestCounter += 1
|
||||
threadData.lastRequestUID = kb.requestCounter
|
||||
|
||||
url = kwargs.get("url", None) or conf.url
|
||||
get = kwargs.get("get", None)
|
||||
|
@ -278,6 +263,27 @@ class Connect(object):
|
|||
finalCode = kwargs.get("finalCode", False)
|
||||
chunked = kwargs.get("chunked", False) or conf.chunked
|
||||
|
||||
start = time.time()
|
||||
|
||||
if isinstance(conf.delay, (int, float)) and conf.delay > 0:
|
||||
time.sleep(conf.delay)
|
||||
|
||||
threadData = getCurrentThreadData()
|
||||
with kb.locks.request:
|
||||
kb.requestCounter += 1
|
||||
threadData.lastRequestUID = kb.requestCounter
|
||||
|
||||
if conf.dummy or conf.murphyRate and randomInt() % conf.murphyRate == 0:
|
||||
if conf.murphyRate:
|
||||
time.sleep(randomInt() % (MAX_MURPHY_SLEEP_TIME + 1))
|
||||
|
||||
page, headers, code = randomStr(int(randomInt()), alphabet=[_unichr(_) for _ in xrange(256)]), None, None if not conf.murphyRate else randomInt(3)
|
||||
|
||||
threadData.lastPage = page
|
||||
threadData.lastCode = code
|
||||
|
||||
return page, headers, code
|
||||
|
||||
if multipart:
|
||||
post = multipart
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user