mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
Adding support for all_proxy (#91)
This commit is contained in:
parent
7a0a4c28e5
commit
57f17794c4
|
@ -1759,6 +1759,13 @@ def _cleanupOptions():
|
|||
conf.binaryFields = conf.binaryFields.replace(" ", "")
|
||||
conf.binaryFields = re.split(PARAMETER_SPLITTING_REGEX, conf.binaryFields)
|
||||
|
||||
envProxy = max(os.environ.get(_, "") for _ in ("all_proxy", "ALL_PROXY", "http_proxy", "HTTP_PROXY", "https_proxy", "HTTPS_PROXY"))
|
||||
if re.search(r"\A(https?|socks[45])://.+:\d+\Z", envProxy) and conf.proxy is None:
|
||||
debugMsg = "using environment proxy '%s'" % envProxy
|
||||
logger.debug(debugMsg)
|
||||
|
||||
conf.proxy = envProxy
|
||||
|
||||
if any((conf.proxy, conf.proxyFile, conf.tor)):
|
||||
conf.disablePrecon = True
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
|||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.4.1.10"
|
||||
VERSION = "1.4.1.11"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
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)
|
||||
|
@ -486,6 +486,9 @@ GOOGLE_ANALYTICS_COOKIE_PREFIX = "__UTM"
|
|||
# Prefix for configuration overriding environment variables
|
||||
SQLMAP_ENVIRONMENT_PREFIX = "SQLMAP_"
|
||||
|
||||
# General OS environment variables that can be used for setting proxy address
|
||||
PROXY_ENVIRONMENT_VARIABLES = ("all_proxy", "ALL_PROXY", "http_proxy", "HTTP_PROXY", "https_proxy", "HTTPS_PROXY")
|
||||
|
||||
# Turn off resume console info to avoid potential slowdowns
|
||||
TURN_OFF_RESUME_INFO_LIMIT = 20
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user