Minor improvement

This commit is contained in:
Miroslav Stampar
2026-01-28 19:52:30 +01:00
parent cb36ff7f22
commit 7767999116
3 changed files with 11 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.1.73"
VERSION = "1.10.1.74"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

View File

@@ -188,13 +188,15 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
threads.append(thread)
# And wait for them to all finish
alive = True
while alive:
while True:
alive = False
for thread in threads:
if thread.is_alive():
if thread.isAlive():
alive = True
time.sleep(0.1)
break
if not alive:
break
time.sleep(0.1)
except (KeyboardInterrupt, SqlmapUserQuitException) as ex:
print()
@@ -211,8 +213,8 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio
if numThreads > 1:
logger.info("waiting for threads to finish%s" % (" (Ctrl+C was pressed)" if isinstance(ex, KeyboardInterrupt) else ""))
try:
while (threading.active_count() > 1):
pass
while threading.active_count() > 1:
time.sleep(0.1)
except KeyboardInterrupt:
kb.multipleCtrlC = True