From 1f82d9587a78ecee9b9e8274d83a359cc59f546b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 20 Feb 2023 15:08:49 +0100 Subject: [PATCH] Minor patch --- lib/core/settings.py | 2 +- lib/core/threads.py | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 71e4a85c5..7be8208c3 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -20,7 +20,7 @@ from thirdparty import six from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.7.2.11" +VERSION = "1.7.2.12" 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) diff --git a/lib/core/threads.py b/lib/core/threads.py index 4999b8491..8b5a21def 100644 --- a/lib/core/threads.py +++ b/lib/core/threads.py @@ -8,6 +8,7 @@ See the file 'LICENSE' for copying permission from __future__ import print_function import difflib +import sqlite3 import threading import time import traceback @@ -227,16 +228,19 @@ def runThreads(numThreads, threadFunction, cleanupFunction=None, forwardExceptio if conf.get("verbose") > 1 and isinstance(ex, SqlmapValueException): traceback.print_exc() - except: + except Exception as ex: print() if not kb.multipleCtrlC: - from lib.core.common import unhandledExceptionMessage + if isinstance(ex, sqlite3.Error): + raise + else: + from lib.core.common import unhandledExceptionMessage - kb.threadException = True - errMsg = unhandledExceptionMessage() - logger.error("thread %s: %s" % (threading.currentThread().getName(), errMsg)) - traceback.print_exc() + kb.threadException = True + errMsg = unhandledExceptionMessage() + logger.error("thread %s: %s" % (threading.currentThread().getName(), errMsg)) + traceback.print_exc() finally: kb.multiThreadMode = False