mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +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 LOCALHOST
|
||||||
from lib.core.settings import MAX_NUMBER_OF_THREADS
|
from lib.core.settings import MAX_NUMBER_OF_THREADS
|
||||||
from lib.core.settings import TIME_DELAY_CANDIDATES
|
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 UNKNOWN_DBMS_VERSION
|
||||||
from lib.core.settings import WEBSCARAB_SPLITTER
|
from lib.core.settings import WEBSCARAB_SPLITTER
|
||||||
from lib.core.update import update
|
from lib.core.update import update
|
||||||
|
@ -862,10 +861,7 @@ def __setDNSCache():
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def _getaddrinfo(*args, **kwargs):
|
def _getaddrinfo(*args, **kwargs):
|
||||||
if conf.proxyDNSResponse:
|
if args in kb.cache:
|
||||||
return conf.proxyDNSResponse
|
|
||||||
|
|
||||||
elif args in kb.cache:
|
|
||||||
return kb.cache[args]
|
return kb.cache[args]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
@ -934,21 +930,6 @@ def __setHTTPProxy():
|
||||||
else:
|
else:
|
||||||
proxyHandler = urllib2.ProxyHandler({"http": __proxyString})
|
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():
|
def __setSafeUrl():
|
||||||
"""
|
"""
|
||||||
Check and set the safe URL options.
|
Check and set the safe URL options.
|
||||||
|
@ -1372,7 +1353,6 @@ def __setConfAttributes():
|
||||||
conf.parameters = {}
|
conf.parameters = {}
|
||||||
conf.path = None
|
conf.path = None
|
||||||
conf.port = None
|
conf.port = None
|
||||||
conf.proxyDNSResponse = None
|
|
||||||
conf.resultsFilename = None
|
conf.resultsFilename = None
|
||||||
conf.resultsFP = None
|
conf.resultsFP = None
|
||||||
conf.scheme = None
|
conf.scheme = None
|
||||||
|
|
|
@ -359,10 +359,3 @@ DUMMY_SQL_INJECTION_CHARS = ";()\"'"
|
||||||
|
|
||||||
# Extensions skipped by crawler
|
# 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")
|
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