diff --git a/lib/core/convert.py b/lib/core/convert.py index 1655d3d43..9551a5e43 100644 --- a/lib/core/convert.py +++ b/lib/core/convert.py @@ -31,6 +31,11 @@ from lib.core.settings import UNICODE_ENCODING from thirdparty import six from thirdparty.six import unichr as _unichr +try: + from html import escape as htmlEscape +except ImportError: + from cgi import escape as htmlEscape + def base64pickle(value): """ Serializes (with pickle) and encodes to Base64 format supplied (binary) value diff --git a/lib/core/dump.py b/lib/core/dump.py index c9c06f672..69ccd29a3 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -31,6 +31,7 @@ from lib.core.convert import getBytes from lib.core.convert import getConsoleLength from lib.core.convert import getText from lib.core.convert import getUnicode +from lib.core.convert import htmlEscape from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger @@ -557,7 +558,7 @@ class Dump(object): else: dataToDumpFile(dumpFP, "%s%s" % (safeCSValue(column), conf.csvDel)) elif conf.dumpFormat == DUMP_FORMAT.HTML: - dataToDumpFile(dumpFP, "%s" % getUnicode(cgi.escape(column).encode("ascii", "xmlcharrefreplace"))) + dataToDumpFile(dumpFP, "%s" % getUnicode(htmlEscape(column).encode("ascii", "xmlcharrefreplace"))) field += 1 @@ -629,7 +630,7 @@ class Dump(object): else: dataToDumpFile(dumpFP, "%s%s" % (safeCSValue(value), conf.csvDel)) elif conf.dumpFormat == DUMP_FORMAT.HTML: - dataToDumpFile(dumpFP, "%s" % getUnicode(cgi.escape(value).encode("ascii", "xmlcharrefreplace"))) + dataToDumpFile(dumpFP, "%s" % getUnicode(htmlEscape(value).encode("ascii", "xmlcharrefreplace"))) field += 1 diff --git a/lib/core/settings.py b/lib/core/settings.py index c49b5d5b2..9544dc4cc 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.11.118" +VERSION = "1.3.12.0" 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)