From f7344a5fc30010c1bb2de5b40eaa97e1a795847c Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 11 Dec 2010 21:28:11 +0000 Subject: [PATCH] update --- lib/request/connect.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/request/connect.py b/lib/request/connect.py index 1db7ee96b..de08de709 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -36,6 +36,7 @@ from lib.core.enums import HTTPMETHOD from lib.core.enums import NULLCONNECTION from lib.core.enums import PLACE from lib.core.exception import sqlmapConnectionException +from lib.core.exception import sqlmapSyntaxException from lib.core.settings import MIN_TIME_RESPONSES from lib.request.basic import decodePage from lib.request.basic import forgeHeaders @@ -264,8 +265,11 @@ class Connect: except (urllib2.URLError, socket.error, socket.timeout, httplib.BadStatusLine, httplib.IncompleteRead), e: tbMsg = traceback.format_exc() - - if "URLError" in tbMsg or "error" in tbMsg: + + if "no host given" in tbMsg: + warnMsg = "invalid url address used (%s)" % repr(url) + raise sqlmapSyntaxException, warnMsg + elif "URLError" in tbMsg or "error" in tbMsg: warnMsg = "unable to connect to the target url" elif "timeout" in tbMsg: warnMsg = "connection timed out to the target url"