diff --git a/lib/core/settings.py b/lib/core/settings.py index 6b9b9a02b..58fe92f29 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.7.0" +VERSION = "1.5.7.1" 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/lib/utils/safe2bin.py b/lib/utils/safe2bin.py index 6aa57aa4b..3288a0d20 100644 --- a/lib/utils/safe2bin.py +++ b/lib/utils/safe2bin.py @@ -10,7 +10,9 @@ import re import string import sys -if sys.version_info >= (3, 0): +PY3 = sys.version_info >= (3, 0) + +if PY3: xrange = range text_type = str string_types = (str,) @@ -92,7 +94,7 @@ def safechardecode(value, binary=False): if binary: if isinstance(retVal, text_type): - retVal = retVal.encode("utf8") + retVal = retVal.encode("utf8", errors="surrogatepass" if PY3 else "strict") elif isinstance(value, (list, tuple)): for i in xrange(len(value)):