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

Skip to content

Commit aa83fe5

Browse files
committed
minor update
1 parent 21010f7 commit aa83fe5

2 files changed

Lines changed: 1 addition & 28 deletions

File tree

lib/core/option.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@
101101
from lib.core.settings import LOCALHOST
102102
from lib.core.settings import MAX_NUMBER_OF_THREADS
103103
from lib.core.settings import TIME_DELAY_CANDIDATES
104-
from lib.core.settings import RAW_IP_ADDR_INFO
105104
from lib.core.settings import UNKNOWN_DBMS_VERSION
106105
from lib.core.settings import WEBSCARAB_SPLITTER
107106
from lib.core.update import update
@@ -862,10 +861,7 @@ def __setDNSCache():
862861
"""
863862

864863
def _getaddrinfo(*args, **kwargs):
865-
if conf.proxyDNSResponse:
866-
return conf.proxyDNSResponse
867-
868-
elif args in kb.cache:
864+
if args in kb.cache:
869865
return kb.cache[args]
870866

871867
else:
@@ -934,21 +930,6 @@ def __setHTTPProxy():
934930
else:
935931
proxyHandler = urllib2.ProxyHandler({"http": __proxyString})
936932

937-
# Just in case patch for eventual "DNS leakage"
938-
if conf.proxy:
939-
if re.match(GENERAL_IP_ADDRESS_REGEX, __hostname):
940-
addrinfo = RAW_IP_ADDR_INFO
941-
for item in addrinfo:
942-
item[-1] = (__hostname, __port)
943-
else:
944-
try:
945-
addrinfo = socket.getaddrinfo(__hostname, __port)
946-
except:
947-
errMsg = "proxy host '%s' does not exist" % __hostname
948-
raise sqlmapConnectionException, errMsg
949-
950-
conf.proxyDNSResponse = addrinfo
951-
952933
def __setSafeUrl():
953934
"""
954935
Check and set the safe URL options.
@@ -1372,7 +1353,6 @@ def __setConfAttributes():
13721353
conf.parameters = {}
13731354
conf.path = None
13741355
conf.port = None
1375-
conf.proxyDNSResponse = None
13761356
conf.resultsFilename = None
13771357
conf.resultsFP = None
13781358
conf.scheme = None

lib/core/settings.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,3 @@
359359

360360
# Extensions skipped by crawler
361361
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")
362-
363-
# Standard getaddrinfo response for raw IP addresses ((None,) -> ('ip', port))
364-
RAW_IP_ADDR_INFO = [
365-
[_socket.AF_INET, _socket.SOCK_STREAM, socket.SOL_TCP, '', (None,)],
366-
[_socket.AF_INET, _socket.SOCK_DGRAM, socket.SOL_UDP, '', (None,)],
367-
[_socket.AF_INET, _socket.SOCK_RAW, socket.SOL_IP, '', (None,)]
368-
]

0 commit comments

Comments
 (0)