Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5ebf572

Browse files
committed
added option --ignore-proxy
1 parent dee15ed commit 5ebf572

4 files changed

Lines changed: 12 additions & 4 deletions

File tree

lib/core/option.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -593,9 +593,8 @@ def __setHTTPProxy():
593593

594594
global proxyHandler
595595

596-
if not conf.proxy:
597-
if conf.hostname in ('localhost', '127.0.0.1'):
598-
proxyHandler = urllib2.ProxyHandler({})
596+
if not conf.proxy and (conf.hostname in ('localhost', '127.0.0.1') or conf.ignoreProxy):
597+
proxyHandler = urllib2.ProxyHandler({})
599598
return
600599

601600
debugMsg = "setting the HTTP proxy to pass by all HTTP requests"

lib/core/optiondict.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
"delay": "float",
5151
"timeout": "float",
5252
"retries": "integer",
53-
"scope": "string"
53+
"scope": "string",
54+
"ignoreProxy": "boolean"
5455
},
5556

5657
"Injection": {

lib/parse/cmdline.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ def cmdLineParser():
129129
request.add_option("--scope", dest="scope",
130130
help="Regexp to filter targets from provided proxy log")
131131

132+
request.add_option("--ignore-proxy", dest="ignoreProxy",
133+
action="store_true",
134+
help="Ignore system default HTTP proxy")
135+
132136
# Injection options
133137
injection = OptionGroup(parser, "Injection", "These options can be "
134138
"used to specify which parameters to test "

sqlmap.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ retries = 3
107107
# Example: (google|yahoo)
108108
scope =
109109

110+
# Ignore system default HTTP proxy
111+
# Valid: True or False
112+
ignoreProxy = False
113+
110114
[Injection]
111115

112116
# Testable parameter(s) comma separated. By default all GET/POST/Cookie

0 commit comments

Comments
 (0)