From f3ee2c09fbae943fa07ae3d490712ebea93e0344 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 17 Jun 2011 15:32:23 +0000 Subject: [PATCH] cleaner fix --- lib/core/option.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index a31f2d33c..378806864 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -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(): """