mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 03:23:48 +03:00
minor update
This commit is contained in:
parent
21010f702c
commit
aa83fe5c66
|
@ -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
|
||||
|
|
|
@ -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,)]
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user