From 6e968584f6251e44271898ba981091903459205b Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 2 Sep 2021 21:44:41 +0200 Subject: [PATCH] Minor refactoring --- lib/core/settings.py | 2 +- lib/request/connect.py | 2 +- lib/utils/api.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 3a8834415..cbb5c8595 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.5.8.8" +VERSION = "1.5.9.0" 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/request/connect.py b/lib/request/connect.py index 0cc83b244..41b159d43 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -695,7 +695,7 @@ class Connect(object): except SqlmapConnectionException as ex: if conf.proxyList and not kb.threadException: - warnMsg = "unable to connect to the target URL ('%s')" % ex + warnMsg = "unable to connect to the target URL ('%s')" % getSafeExString(ex) logger.critical(warnMsg) threadData.retriesCount = conf.retries return Connect._retryProxy(**kwargs) diff --git a/lib/utils/api.py b/lib/utils/api.py index 0b08df882..a2b47cd25 100644 --- a/lib/utils/api.py +++ b/lib/utils/api.py @@ -773,7 +773,7 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, username=Non if not isinstance(ex, _urllib.error.HTTPError) or ex.code == _http_client.UNAUTHORIZED: errMsg = "There has been a problem while connecting to the " errMsg += "REST-JSON API server at '%s' " % addr - errMsg += "(%s)" % ex + errMsg += "(%s)" % getSafeExString(ex) logger.critical(errMsg) return @@ -825,7 +825,7 @@ def client(host=RESTAPI_DEFAULT_ADDRESS, port=RESTAPI_DEFAULT_PORT, username=Non try: argv = ["sqlmap.py"] + shlex.split(command)[1:] except Exception as ex: - logger.error("Error occurred while parsing arguments ('%s')" % ex) + logger.error("Error occurred while parsing arguments ('%s')" % getSafeExString(ex)) taskid = None continue