Consider also --dbms value during the detection phase

This commit is contained in:
Bernardo Damele
2010-11-29 14:48:07 +00:00
parent be6df7abd9
commit 2efb3b78ea
2 changed files with 30 additions and 5 deletions

View File

@@ -108,12 +108,20 @@ def checkSqlInjection(place, parameter, value):
# Skip DBMS-specific tests if they do not match the DBMS
# identified
if injection.dbms is not None and injection.dbms != dbms:
debugMsg = "skipping test '%s' because " % title
debugMsg += "the back-end DBMS is %s" % injection.dbms
logger.debug(debugMsg)
if dbms is not None:
if injection.dbms is not None and injection.dbms != dbms:
debugMsg = "skipping test '%s' because " % title
debugMsg += "the back-end DBMS is %s" % injection.dbms
logger.debug(debugMsg)
continue
continue
if conf.dbms is not None and conf.dbms.lower() != dbms.lower():
debugMsg = "skipping test '%s' because " % title
debugMsg += "the provided DBMS is %s" % conf.dbms
logger.debug(debugMsg)
continue
infoMsg = "testing '%s'" % title
logger.info(infoMsg)