From 74603c55306a83ca0f61ee80679e84ca23c1a081 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 25 Jun 2020 12:55:10 +0200 Subject: [PATCH] Fixes #4239 --- lib/controller/controller.py | 3 +++ lib/core/settings.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/controller/controller.py b/lib/controller/controller.py index 57ed869c7..dfb3e64bd 100644 --- a/lib/controller/controller.py +++ b/lib/controller/controller.py @@ -336,6 +336,9 @@ def start(): conf.httpHeaders.append((header, value)) break + # Note: explicitly URL encode __ ASP(.NET) parameters (e.g. to avoid problems with Base64 encoded '+' character) - standard procedure in web browsers + conf.data = re.sub(r"\b(__\w+)=([^&]+)", lambda match: "%s=%s" % (match.group(1), urlencode(match.group(2), safe='%')), conf.data) + conf.httpHeaders = [conf.httpHeaders[i] for i in xrange(len(conf.httpHeaders)) if conf.httpHeaders[i][0].upper() not in (__[0].upper() for __ in conf.httpHeaders[i + 1:])] initTargetEnv() diff --git a/lib/core/settings.py b/lib/core/settings.py index 62b3779ee..68521c59c 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.6.14" +VERSION = "1.4.6.15" 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)