mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-16 19:40:37 +03:00
Implements #1442
This commit is contained in:
parent
29edb4f75c
commit
53de0e8949
|
@ -207,6 +207,16 @@ def checkSqlInjection(place, parameter, value):
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Skip tests if title, vector or DBMS is included by the
|
||||||
|
# given skip filter
|
||||||
|
if conf.testSkip and any(conf.testSkip in str(item) or \
|
||||||
|
re.search(conf.testSkip, str(item), re.I) for item in \
|
||||||
|
(test.title, test.vector, payloadDbms)):
|
||||||
|
debugMsg = "skipping test '%s' because its " % title
|
||||||
|
debugMsg += "name/vector/DBMS is included by the given skip filter"
|
||||||
|
logger.debug(debugMsg)
|
||||||
|
continue
|
||||||
|
|
||||||
if payloadDbms is not None:
|
if payloadDbms is not None:
|
||||||
# Skip DBMS-specific test if it does not match the user's
|
# Skip DBMS-specific test if it does not match the user's
|
||||||
# provided DBMS
|
# provided DBMS
|
||||||
|
|
|
@ -1634,6 +1634,10 @@ def _cleanupOptions():
|
||||||
conf.testFilter = conf.testFilter.strip('*+')
|
conf.testFilter = conf.testFilter.strip('*+')
|
||||||
conf.testFilter = re.sub(r"([^.])([*+])", "\g<1>.\g<2>", conf.testFilter)
|
conf.testFilter = re.sub(r"([^.])([*+])", "\g<1>.\g<2>", conf.testFilter)
|
||||||
|
|
||||||
|
if conf.testSkip:
|
||||||
|
conf.testSkip = conf.testSkip.strip('*+')
|
||||||
|
conf.testSkip = re.sub(r"([^.])([*+])", "\g<1>.\g<2>", conf.testSkip)
|
||||||
|
|
||||||
if "timeSec" not in kb.explicitSettings:
|
if "timeSec" not in kb.explicitSettings:
|
||||||
if conf.tor:
|
if conf.tor:
|
||||||
conf.timeSec = 2 * conf.timeSec
|
conf.timeSec = 2 * conf.timeSec
|
||||||
|
|
|
@ -205,6 +205,7 @@ optDict = {
|
||||||
"saveConfig": "string",
|
"saveConfig": "string",
|
||||||
"scope": "string",
|
"scope": "string",
|
||||||
"testFilter": "string",
|
"testFilter": "string",
|
||||||
|
"testSkip": "string",
|
||||||
"updateAll": "boolean",
|
"updateAll": "boolean",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -674,6 +674,9 @@ def cmdLineParser(argv=None):
|
||||||
general.add_option("--test-filter", dest="testFilter",
|
general.add_option("--test-filter", dest="testFilter",
|
||||||
help="Select tests by payloads and/or titles (e.g. ROW)")
|
help="Select tests by payloads and/or titles (e.g. ROW)")
|
||||||
|
|
||||||
|
general.add_option("--test-skip", dest="testSkip",
|
||||||
|
help="Skip tests by payloads and/or titles (e.g. BENCHMARK)")
|
||||||
|
|
||||||
general.add_option("--update", dest="updateAll",
|
general.add_option("--update", dest="updateAll",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Update sqlmap")
|
help="Update sqlmap")
|
||||||
|
|
|
@ -708,6 +708,9 @@ scope =
|
||||||
# Select tests by payloads and/or titles (e.g. ROW)
|
# Select tests by payloads and/or titles (e.g. ROW)
|
||||||
testFilter =
|
testFilter =
|
||||||
|
|
||||||
|
# Skip tests by payloads and/or titles (e.g. BENCHMARK)
|
||||||
|
testSkip =
|
||||||
|
|
||||||
# Update sqlmap.
|
# Update sqlmap.
|
||||||
# Valid: True or False
|
# Valid: True or False
|
||||||
updateAll = False
|
updateAll = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user