Skip to content

Commit 82efb0c

Browse files
committed
Minor patch
1 parent ac3f2fd commit 82efb0c

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.3.5.128"
21+
VERSION = "1.3.5.129"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/request/connect.py

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -236,23 +236,8 @@ def getPage(**kwargs):
236236
the target URL page content
237237
"""
238238

239-
start = time.time()
240-
241-
if isinstance(conf.delay, (int, float)) and conf.delay > 0:
242-
time.sleep(conf.delay)
243-
244239
if conf.offline:
245240
return None, None, None
246-
elif conf.dummy or conf.murphyRate and randomInt() % conf.murphyRate == 0:
247-
if conf.murphyRate:
248-
time.sleep(randomInt() % (MAX_MURPHY_SLEEP_TIME + 1))
249-
250-
return randomStr(int(randomInt()), alphabet=[_unichr(_) for _ in xrange(256)]), None, None if not conf.murphyRate else randomInt(3)
251-
252-
threadData = getCurrentThreadData()
253-
with kb.locks.request:
254-
kb.requestCounter += 1
255-
threadData.lastRequestUID = kb.requestCounter
256241

257242
url = kwargs.get("url", None) or conf.url
258243
get = kwargs.get("get", None)
@@ -278,6 +263,27 @@ def getPage(**kwargs):
278263
finalCode = kwargs.get("finalCode", False)
279264
chunked = kwargs.get("chunked", False) or conf.chunked
280265

266+
start = time.time()
267+
268+
if isinstance(conf.delay, (int, float)) and conf.delay > 0:
269+
time.sleep(conf.delay)
270+
271+
threadData = getCurrentThreadData()
272+
with kb.locks.request:
273+
kb.requestCounter += 1
274+
threadData.lastRequestUID = kb.requestCounter
275+
276+
if conf.dummy or conf.murphyRate and randomInt() % conf.murphyRate == 0:
277+
if conf.murphyRate:
278+
time.sleep(randomInt() % (MAX_MURPHY_SLEEP_TIME + 1))
279+
280+
page, headers, code = randomStr(int(randomInt()), alphabet=[_unichr(_) for _ in xrange(256)]), None, None if not conf.murphyRate else randomInt(3)
281+
282+
threadData.lastPage = page
283+
threadData.lastCode = code
284+
285+
return page, headers, code
286+
281287
if multipart:
282288
post = multipart
283289

0 commit comments

Comments
 (0)