Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3ee2c0

Browse files
committed
cleaner fix
1 parent bb987ec commit f3ee2c0

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

lib/core/option.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -904,14 +904,12 @@ def __setHTTPProxy():
904904

905905
# Patch for DNS leakage
906906
if conf.proxy:
907-
if not re.match(GENERAL_IP_ADDRESS_REGEX, __hostname):
908-
try:
909-
addrinfo = socket.getaddrinfo(__hostname, __port)
910-
except:
911-
errMsg = "proxy host '%s' does not exist" % __hostname
912-
raise sqlmapConnectionException, errMsg
913-
__hostname = addrinfo[0][4][0]
914-
conf.proxyDNSResponse = [(2, 1, 0, '', (__hostname, int(__port)))]
907+
try:
908+
addrinfo = socket.getaddrinfo(__hostname, __port)
909+
except:
910+
errMsg = "proxy host '%s' does not exist" % __hostname
911+
raise sqlmapConnectionException, errMsg
912+
conf.proxyDNSResponse = addrinfo
915913

916914
def __setSafeUrl():
917915
"""

0 commit comments

Comments
 (0)