From be987815c9c0da160a413b60ea8e9fbd5a2a91ff Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 21 Apr 2022 15:03:22 +0200 Subject: [PATCH] Patch for #5073 --- lib/core/settings.py | 2 +- sqlmap.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index a4174af4d..cd54fba94 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.6.4.4" +VERSION = "1.6.4.5" 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/sqlmap.py b/sqlmap.py index 81cedef84..910ebb3b5 100755 --- a/sqlmap.py +++ b/sqlmap.py @@ -338,6 +338,12 @@ def main(): logger.critical(errMsg) raise SystemExit + elif "invalid maximum character passed to PyUnicode_New" in excMsg and re.search(r"\A3\.[34]", sys.version) is not None: + errMsg = "please upgrade the Python version (>= 3.5) " + errMsg += "(Reference: 'https://bugs.python.org/issue18183')" + logger.critical(errMsg) + raise SystemExit + elif all(_ in excMsg for _ in ("scramble_caching_sha2", "TypeError")): errMsg = "please downgrade the 'PyMySQL' package (=< 0.8.1) " errMsg += "(Reference: 'https://github.com/PyMySQL/PyMySQL/issues/700')"