mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
fix for a Ctrl+C bug reported by nightman@email.de
This commit is contained in:
@@ -319,6 +319,11 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||
stopLimit = 1
|
||||
|
||||
try:
|
||||
threadData = getCurrentThreadData()
|
||||
numThreads = min(conf.threads, stopLimit-startLimit)
|
||||
threadData.shared.limits = range(startLimit, stopLimit)
|
||||
threadData.shared.outputs = []
|
||||
|
||||
if stopLimit > TURN_OFF_RESUME_INFO_LIMIT:
|
||||
kb.suppressResumeInfo = True
|
||||
infoMsg = "suppressing possible resume console info because of "
|
||||
@@ -329,11 +334,6 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||
for lock in lockNames:
|
||||
kb.locks[lock] = threading.Lock()
|
||||
|
||||
threadData = getCurrentThreadData()
|
||||
numThreads = min(conf.threads, stopLimit-startLimit)
|
||||
threadData.shared.limits = range(startLimit, stopLimit)
|
||||
threadData.shared.outputs = []
|
||||
|
||||
def errorThread():
|
||||
threadData = getCurrentThreadData()
|
||||
|
||||
@@ -361,8 +361,6 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||
|
||||
runThreads(numThreads, errorThread)
|
||||
|
||||
outputs = threadData.shared.outputs
|
||||
|
||||
except KeyboardInterrupt:
|
||||
warnMsg = "user aborted during enumeration. sqlmap "
|
||||
warnMsg += "will display partial output"
|
||||
@@ -375,6 +373,7 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||
logger.critical(errMsg)
|
||||
|
||||
finally:
|
||||
outputs = threadData.shared.outputs
|
||||
kb.suppressResumeInfo = False
|
||||
|
||||
if not outputs:
|
||||
|
||||
Reference in New Issue
Block a user