From d4d2d1a315474163a559dbd2ffc7f07fa03f0e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0tampar?= Date: Thu, 12 Nov 2026 14:46:39 +0100 Subject: [PATCH] Fix for --proxy-file without usable entries silently connecting directly --- lib/core/option.py | 5 +++++ lib/core/settings.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index 5cc7a6dc9..3fdd10c40 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -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 diff --git a/lib/core/settings.py b/lib/core/settings.py index 6f46a774c..8401df549 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import OS from thirdparty import six # sqlmap version (...) -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)