From 55206b9eaa730a87cf7435a35f2e1ee70a60fb3c Mon Sep 17 00:00:00 2001 From: Ryan Young Date: Sat, 14 Dec 2019 22:17:28 -0800 Subject: [PATCH] Support IPv6 literals ("[::1]:8080") in the proxy switch. --- lib/core/option.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index 7e6cac63d..24eb466e3 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -995,7 +995,7 @@ def _setHTTPHandlers(): errMsg = "invalid proxy address '%s' ('%s')" % (conf.proxy, getSafeExString(ex)) raise SqlmapSyntaxException(errMsg) - hostnamePort = _.netloc.split(":") + hostnamePort = _.netloc.rsplit(":", 1) scheme = _.scheme.upper() hostname = hostnamePort[0]