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
|
continue
|
||||||
|
|
||||||
# Skip tests if title is not included by the given filter
|
# Skip tests if title is not included by the given filter
|
||||||
if conf.testFilter:
|
if conf.tstF:
|
||||||
if not any(re.search(conf.testFilter, str(item), re.I) for item in [test.title, test.vector,\
|
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 ""]):
|
test.details.dbms if "details" in test and "dbms" in test.details else ""]):
|
||||||
debugMsg = "skipping test '%s' because " % title
|
debugMsg = "skipping test '%s' because " % title
|
||||||
debugMsg += "its name/vector/dbms is not included by the given filter"
|
debugMsg += "its name/vector/dbms is not included by the given filter"
|
||||||
|
|
|
@ -1324,9 +1324,9 @@ def __cleanupOptions():
|
||||||
if conf.dbms:
|
if conf.dbms:
|
||||||
conf.dbms = conf.dbms.capitalize()
|
conf.dbms = conf.dbms.capitalize()
|
||||||
|
|
||||||
if conf.testFilter:
|
if conf.tstF:
|
||||||
if not any([char in conf.testFilter for char in ('.', ')', '(', ']', '[')]):
|
if not any([char in conf.tstF for char in ('.', ')', '(', ']', '[')]):
|
||||||
conf.testFilter = conf.testFilter.replace('*', '.*')
|
conf.tstF = conf.tstF.replace('*', '.*')
|
||||||
|
|
||||||
if conf.timeSec not in kb.explicitSettings:
|
if conf.timeSec not in kb.explicitSettings:
|
||||||
if conf.tor:
|
if conf.tor:
|
||||||
|
|
|
@ -193,6 +193,7 @@ optDict = {
|
||||||
"mobile": "boolean",
|
"mobile": "boolean",
|
||||||
"pageRank": "boolean",
|
"pageRank": "boolean",
|
||||||
"smart": "boolean",
|
"smart": "boolean",
|
||||||
|
"tstF": "string",
|
||||||
"wizard": "boolean",
|
"wizard": "boolean",
|
||||||
"verbose": "integer"
|
"verbose": "integer"
|
||||||
},
|
},
|
||||||
|
|
|
@ -619,6 +619,9 @@ def cmdLineParser():
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Conduct through tests only if positive heuristic(s)")
|
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",
|
miscellaneous.add_option("--wizard", dest="wizard",
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Simple wizard interface for beginner users")
|
help="Simple wizard interface for beginner users")
|
||||||
|
@ -642,9 +645,6 @@ def cmdLineParser():
|
||||||
parser.add_option("--run-case", dest="runCase", type="int",
|
parser.add_option("--run-case", dest="runCase", type="int",
|
||||||
help=SUPPRESS_HELP)
|
help=SUPPRESS_HELP)
|
||||||
|
|
||||||
parser.add_option("--test-filter", dest="testFilter",
|
|
||||||
help=SUPPRESS_HELP)
|
|
||||||
|
|
||||||
parser.add_option_group(target)
|
parser.add_option_group(target)
|
||||||
parser.add_option_group(request)
|
parser.add_option_group(request)
|
||||||
parser.add_option_group(optimization)
|
parser.add_option_group(optimization)
|
||||||
|
|
|
@ -656,6 +656,9 @@ pageRank = False
|
||||||
# Valid: True or False
|
# Valid: True or False
|
||||||
smart = False
|
smart = False
|
||||||
|
|
||||||
|
# Select tests by payloads and/or titles (e.g. ROW)
|
||||||
|
tstF =
|
||||||
|
|
||||||
# Simple wizard interface for beginner users.
|
# Simple wizard interface for beginner users.
|
||||||
# Valid: True or False
|
# Valid: True or False
|
||||||
wizard = False
|
wizard = False
|
||||||
|
|
Loading…
Reference in New Issue
Block a user