Support IPv6 literals ("[::1]:8080") in the proxy switch. (#4041)

This commit is contained in:
Ryan Young 2019-12-15 08:06:26 -07:00 committed by Miroslav Stampar
parent 3145de15d8
commit 24aadbd850

View File

@ -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]