mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
fix for a Ctrl+C bug reported by nightman@email.de
This commit is contained in:
parent
26062ec71e
commit
e7e23d1b79
|
@ -517,7 +517,7 @@ mitchell <mitchell@tufala.net>
|
||||||
for reporting a bug
|
for reporting a bug
|
||||||
|
|
||||||
nightman <nightman@email.de>
|
nightman <nightman@email.de>
|
||||||
for reporting several bugs
|
for reporting considerable amount of bugs
|
||||||
|
|
||||||
pacman730 <pacman730@users.sourceforge.net>
|
pacman730 <pacman730@users.sourceforge.net>
|
||||||
for reporting a bug
|
for reporting a bug
|
||||||
|
|
|
@ -319,6 +319,11 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||||
stopLimit = 1
|
stopLimit = 1
|
||||||
|
|
||||||
try:
|
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:
|
if stopLimit > TURN_OFF_RESUME_INFO_LIMIT:
|
||||||
kb.suppressResumeInfo = True
|
kb.suppressResumeInfo = True
|
||||||
infoMsg = "suppressing possible resume console info because of "
|
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:
|
for lock in lockNames:
|
||||||
kb.locks[lock] = threading.Lock()
|
kb.locks[lock] = threading.Lock()
|
||||||
|
|
||||||
threadData = getCurrentThreadData()
|
|
||||||
numThreads = min(conf.threads, stopLimit-startLimit)
|
|
||||||
threadData.shared.limits = range(startLimit, stopLimit)
|
|
||||||
threadData.shared.outputs = []
|
|
||||||
|
|
||||||
def errorThread():
|
def errorThread():
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
|
|
||||||
|
@ -361,8 +361,6 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||||
|
|
||||||
runThreads(numThreads, errorThread)
|
runThreads(numThreads, errorThread)
|
||||||
|
|
||||||
outputs = threadData.shared.outputs
|
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
warnMsg = "user aborted during enumeration. sqlmap "
|
warnMsg = "user aborted during enumeration. sqlmap "
|
||||||
warnMsg += "will display partial output"
|
warnMsg += "will display partial output"
|
||||||
|
@ -375,6 +373,7 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
||||||
logger.critical(errMsg)
|
logger.critical(errMsg)
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
|
outputs = threadData.shared.outputs
|
||||||
kb.suppressResumeInfo = False
|
kb.suppressResumeInfo = False
|
||||||
|
|
||||||
if not outputs:
|
if not outputs:
|
||||||
|
|
|
@ -259,6 +259,11 @@ def unionUse(expression, unpack=True, dump=False):
|
||||||
stopLimit = 1
|
stopLimit = 1
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
threadData = getCurrentThreadData()
|
||||||
|
numThreads = min(conf.threads, stopLimit-startLimit)
|
||||||
|
threadData.shared.limits = range(startLimit, stopLimit)
|
||||||
|
threadData.shared.value = ""
|
||||||
|
|
||||||
if stopLimit > TURN_OFF_RESUME_INFO_LIMIT:
|
if stopLimit > TURN_OFF_RESUME_INFO_LIMIT:
|
||||||
kb.suppressResumeInfo = True
|
kb.suppressResumeInfo = True
|
||||||
infoMsg = "suppressing possible resume console info because of "
|
infoMsg = "suppressing possible resume console info because of "
|
||||||
|
@ -269,11 +274,6 @@ def unionUse(expression, unpack=True, dump=False):
|
||||||
for lock in lockNames:
|
for lock in lockNames:
|
||||||
kb.locks[lock] = threading.Lock()
|
kb.locks[lock] = threading.Lock()
|
||||||
|
|
||||||
threadData = getCurrentThreadData()
|
|
||||||
numThreads = min(conf.threads, stopLimit-startLimit)
|
|
||||||
threadData.shared.limits = range(startLimit, stopLimit)
|
|
||||||
threadData.shared.value = ""
|
|
||||||
|
|
||||||
def unionThread():
|
def unionThread():
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
|
|
||||||
|
@ -325,8 +325,6 @@ def unionUse(expression, unpack=True, dump=False):
|
||||||
|
|
||||||
runThreads(numThreads, unionThread)
|
runThreads(numThreads, unionThread)
|
||||||
|
|
||||||
value = threadData.shared.value
|
|
||||||
|
|
||||||
if conf.verbose == 1:
|
if conf.verbose == 1:
|
||||||
clearConsoleLine(True)
|
clearConsoleLine(True)
|
||||||
|
|
||||||
|
@ -342,6 +340,7 @@ def unionUse(expression, unpack=True, dump=False):
|
||||||
logger.critical(errMsg)
|
logger.critical(errMsg)
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
|
value = threadData.shared.value
|
||||||
kb.suppressResumeInfo = False
|
kb.suppressResumeInfo = False
|
||||||
|
|
||||||
if not value:
|
if not value:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user