Fix for --proxy-file without usable entries silently connecting directly

This commit is contained in:
Miroslav Štampar 2026-11-12 14:46:39 +01:00
parent b85cd4cc15
commit d4d2d1a315
2 changed files with 6 additions and 1 deletions

View file

@ -2757,6 +2757,11 @@ def _setProxyList():
_, type_, cred, address, port = match.groups()
conf.proxyList.append("%s://%s%s:%s" % (type_ or "http", ("%s@" % cred) if cred else "", address, port))
# Note: otherwise sqlmap would silently connect directly (i.e. without any proxy)
if not conf.proxyList:
errMsg = "no usable proxy entries found in proxy list file '%s' (expected format e.g. 'http://127.0.0.1:8080')" % conf.proxyFile
raise SqlmapSyntaxException(errMsg)
def _setTorProxySettings():
if not conf.tor:
return

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.39"
VERSION = "1.10.11.40"
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)