cleaner fix

This commit is contained in:
Miroslav Stampar 2011-06-17 15:32:23 +00:00
parent bb987ec98f
commit f3ee2c09fb

View File

@ -904,14 +904,12 @@ def __setHTTPProxy():
# Patch for DNS leakage # Patch for DNS leakage
if conf.proxy: if conf.proxy:
if not re.match(GENERAL_IP_ADDRESS_REGEX, __hostname):
try: try:
addrinfo = socket.getaddrinfo(__hostname, __port) addrinfo = socket.getaddrinfo(__hostname, __port)
except: except:
errMsg = "proxy host '%s' does not exist" % __hostname errMsg = "proxy host '%s' does not exist" % __hostname
raise sqlmapConnectionException, errMsg raise sqlmapConnectionException, errMsg
__hostname = addrinfo[0][4][0] conf.proxyDNSResponse = addrinfo
conf.proxyDNSResponse = [(2, 1, 0, '', (__hostname, int(__port)))]
def __setSafeUrl(): def __setSafeUrl():
""" """