From 290a8e711918018bb4cf4ae5d399ab1ca4cbc9d8 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 16 May 2023 10:59:06 +0200 Subject: [PATCH] Fixes #5411 --- lib/core/common.py | 9 +++++++++ lib/core/settings.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/core/common.py b/lib/core/common.py index 5904a6037..7dd6dbb6f 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -4940,6 +4940,12 @@ def decodeDbmsHexValue(value, raw=False): >>> decodeDbmsHexValue('3132332031') == u'123 1' True + >>> decodeDbmsHexValue('31003200330020003100') == u'123 1' + True + >>> decodeDbmsHexValue('00310032003300200031') == u'123 1' + True + >>> decodeDbmsHexValue('0x31003200330020003100') == u'123 1' + True >>> decodeDbmsHexValue('313233203') == u'123 ?' True >>> decodeDbmsHexValue(['0x31', '0x32']) == [u'1', u'2'] @@ -4978,6 +4984,9 @@ def decodeDbmsHexValue(value, raw=False): if not isinstance(retVal, six.text_type): retVal = getUnicode(retVal, conf.encoding or UNICODE_ENCODING) + if u"\x00" in retVal: + retVal = retVal.replace(u"\x00", u"") + return retVal try: diff --git a/lib/core/settings.py b/lib/core/settings.py index 138e2a890..f4e077a38 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.5.1" +VERSION = "1.7.5.2" 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)