minor update so that only one DNS request per scan is being done (before this commit there were two)

This commit is contained in:
Miroslav Stampar 2011-05-12 14:32:39 +00:00
parent 70688fb8b5
commit f11d5c91e3

View File

@ -848,7 +848,7 @@ def checkNullConnection():
def checkConnection(suppressOutput=False):
try:
socket.gethostbyname(conf.hostname)
socket.getaddrinfo(conf.hostname, None)
except socket.gaierror:
errMsg = "host '%s' does not exist" % conf.hostname
raise sqlmapConnectionException, errMsg