mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Adding switch --skip-waf
This commit is contained in:
parent
e81e474646
commit
81caf14b6d
|
@ -1142,12 +1142,12 @@ def checkWaf():
|
||||||
Reference: http://seclists.org/nmap-dev/2011/q2/att-1005/http-waf-detect.nse
|
Reference: http://seclists.org/nmap-dev/2011/q2/att-1005/http-waf-detect.nse
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if any((conf.string, conf.notString, conf.regexp, conf.dummy, conf.offline)):
|
if any((conf.string, conf.notString, conf.regexp, conf.dummy, conf.offline, conf.skipWaf)):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
dbmMsg = "heuristically checking if the target is protected by "
|
infoMsg = "checking if the target is protected by "
|
||||||
dbmMsg += "some kind of WAF/IPS/IDS"
|
infoMsg += "some kind of WAF/IPS/IDS"
|
||||||
logger.debug(dbmMsg)
|
logger.info(infoMsg)
|
||||||
|
|
||||||
retVal = False
|
retVal = False
|
||||||
payload = "%d %s" % (randomInt(), IDS_WAF_CHECK_PAYLOAD)
|
payload = "%d %s" % (randomInt(), IDS_WAF_CHECK_PAYLOAD)
|
||||||
|
|
|
@ -2295,6 +2295,10 @@ def _basicOptionValidation():
|
||||||
errMsg = "option '-d' is incompatible with option '-u' ('--url')"
|
errMsg = "option '-d' is incompatible with option '-u' ('--url')"
|
||||||
raise SqlmapSyntaxException(errMsg)
|
raise SqlmapSyntaxException(errMsg)
|
||||||
|
|
||||||
|
if conf.identifyWaf and conf.skipWaf:
|
||||||
|
errMsg = "switch '--identify-waf' is incompatible with switch '--skip-waf'"
|
||||||
|
raise SqlmapSyntaxException(errMsg)
|
||||||
|
|
||||||
if conf.titles and conf.nullConnection:
|
if conf.titles and conf.nullConnection:
|
||||||
errMsg = "switch '--titles' is incompatible with switch '--null-connection'"
|
errMsg = "switch '--titles' is incompatible with switch '--null-connection'"
|
||||||
raise SqlmapSyntaxException(errMsg)
|
raise SqlmapSyntaxException(errMsg)
|
||||||
|
|
|
@ -231,6 +231,7 @@ optDict = {
|
||||||
"cpuThrottle": "integer",
|
"cpuThrottle": "integer",
|
||||||
"forceDns": "boolean",
|
"forceDns": "boolean",
|
||||||
"identifyWaf": "boolean",
|
"identifyWaf": "boolean",
|
||||||
|
"skipWaf": "boolean",
|
||||||
"ignore401": "boolean",
|
"ignore401": "boolean",
|
||||||
"smokeTest": "boolean",
|
"smokeTest": "boolean",
|
||||||
"liveTest": "boolean",
|
"liveTest": "boolean",
|
||||||
|
|
|
@ -713,6 +713,10 @@ def cmdLineParser(argv=None):
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Make a thorough testing for a WAF/IPS/IDS protection")
|
help="Make a thorough testing for a WAF/IPS/IDS protection")
|
||||||
|
|
||||||
|
miscellaneous.add_option("--skip-waf", dest="skipWaf",
|
||||||
|
action="store_true",
|
||||||
|
help="Skip heuristic detection of WAF/IPS/IDS protection")
|
||||||
|
|
||||||
miscellaneous.add_option("--mobile", dest="mobile",
|
miscellaneous.add_option("--mobile", dest="mobile",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Imitate smartphone through HTTP User-Agent header")
|
help="Imitate smartphone through HTTP User-Agent header")
|
||||||
|
|
|
@ -750,6 +750,10 @@ googlePage = 1
|
||||||
# Valid: True or False
|
# Valid: True or False
|
||||||
identifyWaf = False
|
identifyWaf = False
|
||||||
|
|
||||||
|
# Skip heuristic detection of WAF/IPS/IDS protection.
|
||||||
|
# Valid: True or False
|
||||||
|
skipWaf = False
|
||||||
|
|
||||||
# Imitate smartphone through HTTP User-Agent header.
|
# Imitate smartphone through HTTP User-Agent header.
|
||||||
# Valid: True or False
|
# Valid: True or False
|
||||||
mobile = False
|
mobile = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user