diff --git a/extra/vulnserver/vulnserver.py b/extra/vulnserver/vulnserver.py index d1f954b1f..22fc1df1c 100644 --- a/extra/vulnserver/vulnserver.py +++ b/extra/vulnserver/vulnserver.py @@ -17,6 +17,7 @@ import threading import traceback PY3 = sys.version_info >= (3, 0) +UNICODE_ENCODING = "utf-8" if PY3: from http.client import INTERNAL_SERVER_ERROR @@ -96,7 +97,7 @@ class ReqHandler(BaseHTTPRequestHandler): self.send_response(INTERNAL_SERVER_ERROR) self.send_header("Connection", "close") self.end_headers() - self.wfile.write("CLOUDFLARE_ERROR_500S_BOX".encode("utf8")) + self.wfile.write("CLOUDFLARE_ERROR_500S_BOX".encode(UNICODE_ENCODING)) return if hasattr(self, "data"): @@ -127,7 +128,7 @@ class ReqHandler(BaseHTTPRequestHandler): if not any(_ in self.params for _ in ("id", "query")): self.send_response(OK) - self.send_header("Content-type", "text/html") + self.send_header("Content-type", "text/html; charset=%s" % UNICODE_ENCODING) self.send_header("Connection", "close") self.end_headers() self.wfile.write(b"

GET:

link


POST:

ID:

") @@ -171,7 +172,7 @@ class ReqHandler(BaseHTTPRequestHandler): self.end_headers() else: self.end_headers() - self.wfile.write(output.encode("utf8") if PY3 else output) + self.wfile.write(quote(output if isinstance(output, bytes) else output.encode(UNICODE_ENCODING))) else: self.send_response(NOT_FOUND) self.send_header("Connection", "close") @@ -190,7 +191,7 @@ class ReqHandler(BaseHTTPRequestHandler): length = int(self.headers.get("Content-length", 0)) if length: data = self.rfile.read(length) - data = unquote_plus(data.decode("utf8")) + data = unquote_plus(data.decode(UNICODE_ENCODING)) self.data = data self.do_REQUEST() diff --git a/lib/core/settings.py b/lib/core/settings.py index 032854bc6..218b8ab73 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.115" +VERSION = "1.3.11.116" 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)