mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
Major silent bug fix to multi-threading functionality. Thanks Nico Leidecker for reporting!
This commit is contained in:
parent
f7ee4d578e
commit
13de8366d0
|
@ -140,6 +140,7 @@ def bisection(payload, expression, length=None, charsetType=None):
|
||||||
|
|
||||||
|
|
||||||
def downloadThread():
|
def downloadThread():
|
||||||
|
try:
|
||||||
while True:
|
while True:
|
||||||
idxlock.acquire()
|
idxlock.acquire()
|
||||||
|
|
||||||
|
@ -168,11 +169,6 @@ def bisection(payload, expression, length=None, charsetType=None):
|
||||||
dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), s))
|
dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), s))
|
||||||
iolock.release()
|
iolock.release()
|
||||||
|
|
||||||
|
|
||||||
def downloadThreadProxy(numThread):
|
|
||||||
try:
|
|
||||||
downloadThread()
|
|
||||||
|
|
||||||
except (sqlmapConnectionException, sqlmapValueException), errMsg:
|
except (sqlmapConnectionException, sqlmapValueException), errMsg:
|
||||||
conf.threadException = True
|
conf.threadException = True
|
||||||
logger.error("thread %d: %s" % (numThread + 1, errMsg))
|
logger.error("thread %d: %s" % (numThread + 1, errMsg))
|
||||||
|
@ -199,7 +195,7 @@ def bisection(payload, expression, length=None, charsetType=None):
|
||||||
|
|
||||||
# Start the threads
|
# Start the threads
|
||||||
for numThread in range(numThreads):
|
for numThread in range(numThreads):
|
||||||
thread = threading.Thread(target=downloadThreadProxy(numThread))
|
thread = threading.Thread(target=downloadThread)
|
||||||
thread.start()
|
thread.start()
|
||||||
threads.append(thread)
|
threads.append(thread)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user