diff --git a/lib/core/common.py b/lib/core/common.py index cd64c5694..b1c0f5862 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3892,7 +3892,7 @@ def removeReflectiveValues(content, payload, suppressWarning=False): return retVal -def normalizeUnicode(value): +def normalizeUnicode(value, charset=string.printable[:string.printable.find(' ') + 1]): """ Does an ASCII normalization of unicode strings @@ -3900,14 +3900,13 @@ def normalizeUnicode(value): >>> normalizeUnicode(u'\u0161u\u0107uraj') == u'sucuraj' True - >>> normalizeUnicode(getUnicode(codecs.decode("666f6f00626172", "hex"))) == u'foobar' + >>> normalizeUnicode(getUnicode(decodeHex("666f6f00626172"))) == u'foobar' True """ retVal = value if isinstance(value, six.text_type): - charset = string.printable[:string.printable.find(' ') + 1] retVal = unicodedata.normalize("NFKD", value) retVal = "".join(_ for _ in retVal if _ in charset) diff --git a/lib/core/settings.py b/lib/core/settings.py index b2b69afa2..296184b97 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.5.98" +VERSION = "1.3.5.99" 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)