mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 14:55:40 +00:00
Fixes #2235
This commit is contained in:
parent
5b14eecd25
commit
7e69cc112f
3 changed files with 6 additions and 5 deletions
|
|
@ -20,6 +20,7 @@ from lib.core.datatype import AttribDict
|
|||
from lib.core.enums import PAYLOAD
|
||||
from lib.core.exception import SqlmapConnectionException
|
||||
from lib.core.exception import SqlmapThreadException
|
||||
from lib.core.exception import SqlmapUserQuitException
|
||||
from lib.core.exception import SqlmapValueException
|
||||
from lib.core.settings import MAX_NUMBER_OF_THREADS
|
||||
from lib.core.settings import PYVERSION
|
||||
|
|
@ -166,13 +167,13 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
|
|||
alive = True
|
||||
time.sleep(0.1)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
except (KeyboardInterrupt, SqlmapUserQuitException), ex:
|
||||
print
|
||||
kb.threadContinue = False
|
||||
kb.threadException = True
|
||||
|
||||
if numThreads > 1:
|
||||
logger.info("waiting for threads to finish (Ctrl+C was pressed)")
|
||||
logger.info("waiting for threads to finish%s" % (" (Ctrl+C was pressed)" if isinstance(ex, KeyboardInterrupt) else ""))
|
||||
try:
|
||||
while (threading.activeCount() > 1):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue