diff --git a/lib/core/common.py b/lib/core/common.py index 77d230abb..73d24e47f 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1028,10 +1028,12 @@ def dataToStdout(data, forceOutput=False, bold=False, contentType=None, status=C sys.stdout.write(stdoutEncode(clearColors(data)), status, contentType) else: sys.stdout.write(stdoutEncode(setColor(data, bold=bold) if coloring else clearColors(data))) - - sys.stdout.flush() except IOError: pass + except UnicodeEncodeError: + sys.stdout.write(re.sub(r"[^ -~]", '?', clearColors(data))) + finally: + sys.stdout.flush() if multiThreadMode: logging._releaseLock() diff --git a/lib/core/settings.py b/lib/core/settings.py index d73f3e03f..2390676d0 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.11.2" +VERSION = "1.5.11.3" 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)