mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
multithreading save to session on abort
This commit is contained in:
parent
6d11f86fdd
commit
9edd468caf
|
@ -354,6 +354,17 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), replaceNewlineTabs(output, stdout=True)))
|
||||
iolock.release()
|
||||
|
||||
#TODO: more
|
||||
if not conf.threadContinue:
|
||||
if int(threading.currentThread().getName()) == numThreads - 1:
|
||||
partialValue = unicode()
|
||||
for v in value:
|
||||
if isinstance(v, basestring) and v is not None:
|
||||
partialValue += v
|
||||
|
||||
if len(partialValue) > 0:
|
||||
dataToSessionFile(replaceNewlineTabs(partialValue))
|
||||
|
||||
except (sqlmapConnectionException, sqlmapValueException), errMsg:
|
||||
print
|
||||
conf.threadException = True
|
||||
|
@ -381,7 +392,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
|
||||
# Start the threads
|
||||
for numThread in range(numThreads):
|
||||
thread = threading.Thread(target=downloadThread)
|
||||
thread = threading.Thread(target=downloadThread, name=str(numThread))
|
||||
thread.start()
|
||||
threads.append(thread)
|
||||
|
||||
|
@ -497,7 +508,6 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
|||
break
|
||||
|
||||
finalValue += val
|
||||
|
||||
dataToSessionFile(replaceNewlineTabs(val))
|
||||
|
||||
if showEta:
|
||||
|
|
Loading…
Reference in New Issue
Block a user