diff --git a/lib/core/threads.py b/lib/core/threads.py index 20f207a2d..0f03856dd 100644 --- a/lib/core/threads.py +++ b/lib/core/threads.py @@ -49,7 +49,7 @@ def getCurrentThreadData(): kb.threadData[threadUID] = ThreadData() return kb.threadData[threadUID] -def runThreads(numThreads, threadFunction, cleanupFunction=None): +def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardException=True): threads = [] kb.threadContinue = True @@ -94,6 +94,9 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None): except KeyboardInterrupt: raise sqlmapThreadException, "user aborted (Ctrl+C was pressed multiple times)" + if forwardException: + raise + finally: kb.threadContinue = True kb.threadException = False