mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-03 19:55:47 +03:00
unhidding --test-filter
This commit is contained in:
parent
d2dd47fb23
commit
76584ff0fa
|
@ -139,8 +139,8 @@ def checkSqlInjection(place, parameter, value):
|
|||
continue
|
||||
|
||||
# Skip tests if title is not included by the given filter
|
||||
if conf.testFilter:
|
||||
if not any(re.search(conf.testFilter, str(item), re.I) for item in [test.title, test.vector,\
|
||||
if conf.tstF:
|
||||
if not any(re.search(conf.tstF, str(item), re.I) for item in [test.title, test.vector,\
|
||||
test.details.dbms if "details" in test and "dbms" in test.details else ""]):
|
||||
debugMsg = "skipping test '%s' because " % title
|
||||
debugMsg += "its name/vector/dbms is not included by the given filter"
|
||||
|
|
|
@ -1324,9 +1324,9 @@ def __cleanupOptions():
|
|||
if conf.dbms:
|
||||
conf.dbms = conf.dbms.capitalize()
|
||||
|
||||
if conf.testFilter:
|
||||
if not any([char in conf.testFilter for char in ('.', ')', '(', ']', '[')]):
|
||||
conf.testFilter = conf.testFilter.replace('*', '.*')
|
||||
if conf.tstF:
|
||||
if not any([char in conf.tstF for char in ('.', ')', '(', ']', '[')]):
|
||||
conf.tstF = conf.tstF.replace('*', '.*')
|
||||
|
||||
if conf.timeSec not in kb.explicitSettings:
|
||||
if conf.tor:
|
||||
|
|
|
@ -193,6 +193,7 @@ optDict = {
|
|||
"mobile": "boolean",
|
||||
"pageRank": "boolean",
|
||||
"smart": "boolean",
|
||||
"tstF": "string",
|
||||
"wizard": "boolean",
|
||||
"verbose": "integer"
|
||||
},
|
||||
|
|
|
@ -619,6 +619,9 @@ def cmdLineParser():
|
|||
action="store_true",
|
||||
help="Conduct through tests only if positive heuristic(s)")
|
||||
|
||||
miscellaneous.add_option("--test-filter", dest="tstF",
|
||||
help="Select tests by payloads and/or titles (e.g. ROW)")
|
||||
|
||||
miscellaneous.add_option("--wizard", dest="wizard",
|
||||
action="store_true",
|
||||
help="Simple wizard interface for beginner users")
|
||||
|
@ -642,9 +645,6 @@ def cmdLineParser():
|
|||
parser.add_option("--run-case", dest="runCase", type="int",
|
||||
help=SUPPRESS_HELP)
|
||||
|
||||
parser.add_option("--test-filter", dest="testFilter",
|
||||
help=SUPPRESS_HELP)
|
||||
|
||||
parser.add_option_group(target)
|
||||
parser.add_option_group(request)
|
||||
parser.add_option_group(optimization)
|
||||
|
|
|
@ -656,6 +656,9 @@ pageRank = False
|
|||
# Valid: True or False
|
||||
smart = False
|
||||
|
||||
# Select tests by payloads and/or titles (e.g. ROW)
|
||||
tstF =
|
||||
|
||||
# Simple wizard interface for beginner users.
|
||||
# Valid: True or False
|
||||
wizard = False
|
||||
|
|
Loading…
Reference in New Issue
Block a user