From 63c2d2050db465e3ac5eb319fdaba66d8fc9a946 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 9 Oct 2019 20:06:47 +0300 Subject: [PATCH] Fixes #3953 --- lib/core/common.py | 23 ++++++++++++----------- lib/core/settings.py | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index e2ced30fd..640b04cc4 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -4700,18 +4700,19 @@ def decodeDbmsHexValue(value, raw=False): else: retVal = decodeHex(value) - if not kb.binaryField and not raw: - if Backend.isDbms(DBMS.MSSQL) and value.startswith("0x"): - try: - retVal = retVal.decode("utf-16-le") - except UnicodeDecodeError: - pass + if not raw: + if not kb.binaryField: + if Backend.isDbms(DBMS.MSSQL) and value.startswith("0x"): + try: + retVal = retVal.decode("utf-16-le") + except UnicodeDecodeError: + pass - elif Backend.getIdentifiedDbms() in (DBMS.HSQLDB, DBMS.H2): - try: - retVal = retVal.decode("utf-16-be") - except UnicodeDecodeError: - pass + elif Backend.getIdentifiedDbms() in (DBMS.HSQLDB, DBMS.H2): + try: + retVal = retVal.decode("utf-16-be") + except UnicodeDecodeError: + pass if not isinstance(retVal, six.text_type): retVal = getUnicode(retVal, conf.encoding or UNICODE_ENCODING) diff --git a/lib/core/settings.py b/lib/core/settings.py index 316073349..f2c3b2b8d 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.10.7" +VERSION = "1.3.10.8" 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)