minor update

This commit is contained in:
Miroslav Stampar 2011-09-27 14:31:58 +00:00
parent 88f1110c44
commit b888a84764

View File

@ -128,6 +128,15 @@ def checkSqlInjection(place, parameter, value):
logger.debug(debugMsg) logger.debug(debugMsg)
continue 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,\
test.details.dbms if "details" in test and "dbms" in test.details else ""]):
debugMsg = "skipping test '%s' because " % title
debugMsg += "it's name/vector/dbms is not included by the given filter"
logger.debug(debugMsg)
continue
else:
# Skip test if the risk is higher than the provided (or default) # Skip test if the risk is higher than the provided (or default)
# value # value
# Parse test's <risk> # Parse test's <risk>
@ -146,13 +155,6 @@ def checkSqlInjection(place, parameter, value):
logger.debug(debugMsg) logger.debug(debugMsg)
continue continue
# Skip tests if title is not included by the given filter
if conf.testFilter and not re.search(conf.testFilter, test.title, re.I):
debugMsg = "skipping test '%s' because " % title
debugMsg += "it's name is not included by the given filter"
logger.debug(debugMsg)
continue
# Skip DBMS-specific test if it does not match either the # Skip DBMS-specific test if it does not match either the
# previously identified or the user's provided DBMS (either # previously identified or the user's provided DBMS (either
# from program switch or from parsed error message(s)) # from program switch or from parsed error message(s))