@@ -114,6 +114,7 @@ def setDaemon(thread):
114114def runThreads (numThreads , threadFunction , cleanupFunction = None , forwardException = True , threadChoice = False , startThreadMsg = True ):
115115 threads = []
116116
117+ kb .multipleCtrlC = False
117118 kb .threadContinue = True
118119 kb .threadException = False
119120 kb .technique = ThreadData .technique
@@ -185,6 +186,7 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
185186 pass
186187
187188 except KeyboardInterrupt :
189+ kb .multipleCtrlC = True
188190 raise SqlmapThreadException ("user aborted (Ctrl+C was pressed multiple times)" )
189191
190192 if forwardException :
@@ -199,13 +201,15 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
199201 traceback .print_exc ()
200202
201203 except :
202- from lib .core .common import unhandledExceptionMessage
203-
204204 print ()
205- kb .threadException = True
206- errMsg = unhandledExceptionMessage ()
207- logger .error ("thread %s: %s" % (threading .currentThread ().getName (), errMsg ))
208- traceback .print_exc ()
205+
206+ if not kb .multipleCtrlC :
207+ from lib .core .common import unhandledExceptionMessage
208+
209+ kb .threadException = True
210+ errMsg = unhandledExceptionMessage ()
211+ logger .error ("thread %s: %s" % (threading .currentThread ().getName (), errMsg ))
212+ traceback .print_exc ()
209213
210214 finally :
211215 kb .threadContinue = True
0 commit comments