From 02d20ccd13afc378a169f309ef92720264756718 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 30 Dec 2014 08:48:50 +0000 Subject: [PATCH] Patch for an Issue #1078 --- lib/core/option.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index c04e6d3fe..2db7d3d78 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1079,7 +1079,12 @@ def _setHTTPProxy(): debugMsg = "setting the HTTP/SOCKS proxy for all HTTP requests" logger.debug(debugMsg) - _ = urlparse.urlsplit(conf.proxy) + try: + _ = urlparse.urlsplit(conf.proxy) + except Exception, ex: + errMsg = "invalid proxy address '%s' ('%s')" % (conf.proxy, ex) + raise SqlmapSyntaxException, errMsg + hostnamePort = _.netloc.split(":") scheme = _.scheme.upper()