minor update

This commit is contained in:
Miroslav Stampar 2011-06-24 17:19:24 +00:00
parent 96190cf594
commit 2de88bd90b

View File

@ -868,11 +868,12 @@ def checkNullConnection():
return kb.nullConnection is not None
def checkConnection(suppressOutput=False):
try:
socket.getaddrinfo(conf.hostname, None)
except socket.gaierror:
errMsg = "host '%s' does not exist" % conf.hostname
raise sqlmapConnectionException, errMsg
if not conf.proxy:
try:
socket.getaddrinfo(conf.hostname, None)
except socket.gaierror:
errMsg = "host '%s' does not exist" % conf.hostname
raise sqlmapConnectionException, errMsg
if not suppressOutput:
infoMsg = "testing connection to the target url"