mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
cleaner fix
This commit is contained in:
parent
bb987ec98f
commit
f3ee2c09fb
|
@ -904,14 +904,12 @@ def __setHTTPProxy():
|
|||
|
||||
# Patch for DNS leakage
|
||||
if conf.proxy:
|
||||
if not re.match(GENERAL_IP_ADDRESS_REGEX, __hostname):
|
||||
try:
|
||||
addrinfo = socket.getaddrinfo(__hostname, __port)
|
||||
except:
|
||||
errMsg = "proxy host '%s' does not exist" % __hostname
|
||||
raise sqlmapConnectionException, errMsg
|
||||
__hostname = addrinfo[0][4][0]
|
||||
conf.proxyDNSResponse = [(2, 1, 0, '', (__hostname, int(__port)))]
|
||||
try:
|
||||
addrinfo = socket.getaddrinfo(__hostname, __port)
|
||||
except:
|
||||
errMsg = "proxy host '%s' does not exist" % __hostname
|
||||
raise sqlmapConnectionException, errMsg
|
||||
conf.proxyDNSResponse = addrinfo
|
||||
|
||||
def __setSafeUrl():
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user