From 715063f0d4a3556f4756731d418559a9156ab187 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 9 Sep 2020 16:15:23 +0200 Subject: [PATCH] Patching session PY2<->PY3 incompatibility issue --- lib/core/common.py | 2 +- lib/core/convert.py | 6 +++--- lib/core/settings.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 9a6da74e2..a6a1c37ec 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -4774,7 +4774,7 @@ def serializeObject(object_): """ Serializes given object - >>> type(serializeObject([1, 2, 3, ('a', 'b')])) == six.binary_type + >>> type(serializeObject([1, 2, 3, ('a', 'b')])) == str True """ diff --git a/lib/core/convert.py b/lib/core/convert.py index 11197b537..8aa22490c 100644 --- a/lib/core/convert.py +++ b/lib/core/convert.py @@ -48,16 +48,16 @@ def base64pickle(value): retVal = None try: - retVal = encodeBase64(pickle.dumps(value, PICKLE_PROTOCOL)) + retVal = encodeBase64(pickle.dumps(value, PICKLE_PROTOCOL), binary=False) except: warnMsg = "problem occurred while serializing " warnMsg += "instance of a type '%s'" % type(value) singleTimeWarnMessage(warnMsg) try: - retVal = encodeBase64(pickle.dumps(value)) + retVal = encodeBase64(pickle.dumps(value), binary=False) except: - retVal = encodeBase64(pickle.dumps(str(value), PICKLE_PROTOCOL)) + retVal = encodeBase64(pickle.dumps(str(value), PICKLE_PROTOCOL), binary=False) return retVal diff --git a/lib/core/settings.py b/lib/core/settings.py index d82145369..daa517fde 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.4.9.7" +VERSION = "1.4.9.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)