Skip to content

Commit 4f94d69

Browse files
committed
Fix for --proxy-cred with URL-encoded looking characters (e.g. '%41')
1 parent b6761e1 commit 4f94d69

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎lib/core/option.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,8 @@ def _setHTTPHandlers():
13741374

13751375
if conf.proxyCred:
13761376
# Reference: http://stackoverflow.com/questions/34079/how-to-specify-an-authenticated-proxy-for-a-python-http-connection
1377-
proxyString = "%s@" % conf.proxyCred
1377+
# Note: (raw) credentials have to be URL-encoded, as urllib decodes them (e.g. '%41' would become 'A')
1378+
proxyString = "%s@" % ':'.join(_urllib.parse.quote(_, safe="") for _ in conf.proxyCred.split(':', 1))
13781379
elif match:
13791380
# Note: credentials from the proxy URL itself (kept URL-encoded, as urllib decodes them on its own)
13801381
proxyString = "%s:%s@" % (match.group(1), match.group(2))

‎lib/core/settings.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from thirdparty import six
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.10.11.56"
22+
VERSION = "1.10.11.57"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)