mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
Fixes #3667
This commit is contained in:
parent
fe442831f9
commit
61f32192b0
|
@ -1022,12 +1022,8 @@ def _setHTTPHandlers():
|
||||||
"""
|
"""
|
||||||
Check and set the HTTP/SOCKS proxy for all HTTP requests.
|
Check and set the HTTP/SOCKS proxy for all HTTP requests.
|
||||||
"""
|
"""
|
||||||
global proxyHandler
|
|
||||||
|
|
||||||
for _ in ("http", "https"):
|
|
||||||
if hasattr(proxyHandler, "%s_open" % _):
|
|
||||||
delattr(proxyHandler, "%s_open" % _)
|
|
||||||
|
|
||||||
|
with kb.locks.handlers:
|
||||||
if conf.proxyList is not None:
|
if conf.proxyList is not None:
|
||||||
if not conf.proxyList:
|
if not conf.proxyList:
|
||||||
errMsg = "list of usable proxies is exhausted"
|
errMsg = "list of usable proxies is exhausted"
|
||||||
|
@ -1104,6 +1100,11 @@ def _setHTTPHandlers():
|
||||||
|
|
||||||
proxyHandler.__init__(proxyHandler.proxies)
|
proxyHandler.__init__(proxyHandler.proxies)
|
||||||
|
|
||||||
|
if not proxyHandler.proxies:
|
||||||
|
for _ in ("http", "https"):
|
||||||
|
if hasattr(proxyHandler, "%s_open" % _):
|
||||||
|
delattr(proxyHandler, "%s_open" % _)
|
||||||
|
|
||||||
debugMsg = "creating HTTP requests opener object"
|
debugMsg = "creating HTTP requests opener object"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
|
@ -1925,7 +1926,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||||
kb.lastParserStatus = None
|
kb.lastParserStatus = None
|
||||||
|
|
||||||
kb.locks = AttribDict()
|
kb.locks = AttribDict()
|
||||||
for _ in ("cache", "connError", "count", "index", "io", "limit", "log", "socket", "redirect", "request", "value"):
|
for _ in ("cache", "connError", "count", "handlers", "index", "io", "limit", "log", "socket", "redirect", "request", "value"):
|
||||||
kb.locks[_] = threading.Lock()
|
kb.locks[_] = threading.Lock()
|
||||||
|
|
||||||
kb.matchRatio = None
|
kb.matchRatio = None
|
||||||
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
||||||
from thirdparty.six import unichr as _unichr
|
from thirdparty.six import unichr as _unichr
|
||||||
|
|
||||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||||
VERSION = "1.3.5.93"
|
VERSION = "1.3.5.94"
|
||||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||||
|
|
|
@ -146,7 +146,7 @@ class Connect(object):
|
||||||
threadData = getCurrentThreadData()
|
threadData = getCurrentThreadData()
|
||||||
threadData.retriesCount += 1
|
threadData.retriesCount += 1
|
||||||
|
|
||||||
if conf.proxyList and threadData.retriesCount >= conf.retries:
|
if conf.proxyList and threadData.retriesCount >= conf.retries and not kb.locks.handlers.locked():
|
||||||
warnMsg = "changing proxy"
|
warnMsg = "changing proxy"
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user