From aa83fe5c66e5a0616a020cc39829cb8dfb57eb25 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 24 Jun 2011 18:19:33 +0000 Subject: [PATCH] minor update --- lib/core/option.py | 22 +--------------------- lib/core/settings.py | 7 ------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 68fea2af2..0762dde31 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -101,7 +101,6 @@ from lib.core.settings import BURP_SPLITTER from lib.core.settings import LOCALHOST from lib.core.settings import MAX_NUMBER_OF_THREADS from lib.core.settings import TIME_DELAY_CANDIDATES -from lib.core.settings import RAW_IP_ADDR_INFO from lib.core.settings import UNKNOWN_DBMS_VERSION from lib.core.settings import WEBSCARAB_SPLITTER from lib.core.update import update @@ -862,10 +861,7 @@ def __setDNSCache(): """ def _getaddrinfo(*args, **kwargs): - if conf.proxyDNSResponse: - return conf.proxyDNSResponse - - elif args in kb.cache: + if args in kb.cache: return kb.cache[args] else: @@ -934,21 +930,6 @@ def __setHTTPProxy(): else: proxyHandler = urllib2.ProxyHandler({"http": __proxyString}) - # Just in case patch for eventual "DNS leakage" - if conf.proxy: - if re.match(GENERAL_IP_ADDRESS_REGEX, __hostname): - addrinfo = RAW_IP_ADDR_INFO - for item in addrinfo: - item[-1] = (__hostname, __port) - else: - try: - addrinfo = socket.getaddrinfo(__hostname, __port) - except: - errMsg = "proxy host '%s' does not exist" % __hostname - raise sqlmapConnectionException, errMsg - - conf.proxyDNSResponse = addrinfo - def __setSafeUrl(): """ Check and set the safe URL options. @@ -1372,7 +1353,6 @@ def __setConfAttributes(): conf.parameters = {} conf.path = None conf.port = None - conf.proxyDNSResponse = None conf.resultsFilename = None conf.resultsFP = None conf.scheme = None diff --git a/lib/core/settings.py b/lib/core/settings.py index af6dc81f5..64484afee 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -359,10 +359,3 @@ DUMMY_SQL_INJECTION_CHARS = ";()\"'" # Extensions skipped by crawler CRAWL_EXCLUDE_EXTENSIONS = ("gif","jpg","jar","tif","bmp","war","ear","mpg","wmv","mpeg","scm","iso","dmp","dll","cab","so","avi","bin","exe","iso","tar","png","pdf","ps","mp3","zip","rar","gz") - -# Standard getaddrinfo response for raw IP addresses ((None,) -> ('ip', port)) -RAW_IP_ADDR_INFO = [ - [_socket.AF_INET, _socket.SOCK_STREAM, socket.SOL_TCP, '', (None,)], - [_socket.AF_INET, _socket.SOCK_DGRAM, socket.SOL_UDP, '', (None,)], - [_socket.AF_INET, _socket.SOCK_RAW, socket.SOL_IP, '', (None,)] - ]