Fix for --proxy-cred with URL-encoded looking characters (e.g. '%41')
Some checks are pending
/ build (macos-latest, 3.8) (push) Waiting to run
/ build (ubuntu-latest, pypy-2.7) (push) Waiting to run
/ build (windows-latest, 3.14) (push) Waiting to run

This commit is contained in:
Miroslav Štampar 2026-11-12 16:25:58 +01:00
parent b6761e1825
commit 4f94d69783
2 changed files with 3 additions and 2 deletions

View file

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

View file

@ -19,7 +19,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.11.56"
VERSION = "1.10.11.57"
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)