diff --git a/lib/core/option.py b/lib/core/option.py index 1b7d0d2b9..8bf74e381 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -593,9 +593,8 @@ def __setHTTPProxy(): global proxyHandler - if not conf.proxy: - if conf.hostname in ('localhost', '127.0.0.1'): - proxyHandler = urllib2.ProxyHandler({}) + if not conf.proxy and (conf.hostname in ('localhost', '127.0.0.1') or conf.ignoreProxy): + proxyHandler = urllib2.ProxyHandler({}) return debugMsg = "setting the HTTP proxy to pass by all HTTP requests" diff --git a/lib/core/optiondict.py b/lib/core/optiondict.py index 367ac63ff..b3ef02434 100644 --- a/lib/core/optiondict.py +++ b/lib/core/optiondict.py @@ -50,7 +50,8 @@ optDict = { "delay": "float", "timeout": "float", "retries": "integer", - "scope": "string" + "scope": "string", + "ignoreProxy": "boolean" }, "Injection": { diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index abe96f641..66abe3e1c 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -129,6 +129,10 @@ def cmdLineParser(): request.add_option("--scope", dest="scope", help="Regexp to filter targets from provided proxy log") + request.add_option("--ignore-proxy", dest="ignoreProxy", + action="store_true", + help="Ignore system default HTTP proxy") + # Injection options injection = OptionGroup(parser, "Injection", "These options can be " "used to specify which parameters to test " diff --git a/sqlmap.conf b/sqlmap.conf index bb35923f7..a43c901cb 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -107,6 +107,10 @@ retries = 3 # Example: (google|yahoo) scope = +# Ignore system default HTTP proxy +# Valid: True or False +ignoreProxy = False + [Injection] # Testable parameter(s) comma separated. By default all GET/POST/Cookie