Bug fix (multiple Ctrl-C in crawling mode)

This commit is contained in:
Miroslav Stampar
2019-11-09 01:01:19 +01:00
parent 72fa5a9c85
commit 8cdc66fdf7
4 changed files with 10 additions and 1 deletions

View File

@@ -185,6 +185,12 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
kb.threadContinue = False
kb.threadException = True
if kb.lastCtrlCTime and (time.time() - kb.lastCtrlCTime < 1):
kb.multipleCtrlC = True
raise SqlmapUserQuitException("user aborted (Ctrl+C was pressed multiple times)")
kb.lastCtrlCTime = time.time()
if numThreads > 1:
logger.info("waiting for threads to finish%s" % (" (Ctrl+C was pressed)" if isinstance(ex, KeyboardInterrupt) else ""))
try: