mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-26 16:03:19 +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)))
|
dataToStdout("\r[%s] [INFO] retrieved: %s" % (time.strftime("%X"), replaceNewlineTabs(output, stdout=True)))
|
||||||
iolock.release()
|
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:
|
except (sqlmapConnectionException, sqlmapValueException), errMsg:
|
||||||
print
|
print
|
||||||
conf.threadException = True
|
conf.threadException = True
|
||||||
|
@ -381,7 +392,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||||
|
|
||||||
# Start the threads
|
# Start the threads
|
||||||
for numThread in range(numThreads):
|
for numThread in range(numThreads):
|
||||||
thread = threading.Thread(target=downloadThread)
|
thread = threading.Thread(target=downloadThread, name=str(numThread))
|
||||||
thread.start()
|
thread.start()
|
||||||
threads.append(thread)
|
threads.append(thread)
|
||||||
|
|
||||||
|
@ -497,7 +508,6 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||||
break
|
break
|
||||||
|
|
||||||
finalValue += val
|
finalValue += val
|
||||||
|
|
||||||
dataToSessionFile(replaceNewlineTabs(val))
|
dataToSessionFile(replaceNewlineTabs(val))
|
||||||
|
|
||||||
if showEta:
|
if showEta:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user