Minor bug fix

This commit is contained in:
Bernardo Damele 2011-01-13 20:59:13 +00:00
parent 2ac8debea0
commit f8c04ce020
2 changed files with 5 additions and 7 deletions

View File

@ -149,7 +149,7 @@ def checkSqlInjection(place, parameter, value):
continue
if getErrorParsedDBMSes() and dbms not in getErrorParsedDBMSes() and kb.skipOthersDbms is None:
if len(getErrorParsedDBMSes()) > 0 and dbms not in getErrorParsedDBMSes() and kb.skipOthersDbms is None:
msg = "parsed error message(s) showed that the "
msg += "back-end DBMS could be '%s'. " % getErrorParsedDBMSesFormatted()
msg += "Do you want to skip test payloads specific for other DBMSes? [Y/n]"

View File

@ -297,12 +297,10 @@ def getErrorParsedDBMSesFormatted():
htmlParsed = ""
if not kb.htmlFp:
if len(kb.htmlFp) == 0:
return None
if len(kb.htmlFp) == 1:
htmlVer = kb.htmlFp[0]
htmlParsed = htmlVer
elif len(kb.htmlFp) == 1:
htmlParsed = kb.htmlFp[0]
elif len(kb.htmlFp) > 1:
htmlParsed = " or ".join([htmlFp for htmlFp in kb.htmlFp])
@ -2047,7 +2045,7 @@ def getIdentifiedDBMS():
dbms = kb.dbms
elif conf.dbms is not None:
dbms = conf.dbms
elif getErrorParsedDBMSes() is not None:
elif len(getErrorParsedDBMSes()) > 0:
dbms = getErrorParsedDBMSes()[0]
return aliasToDbmsEnum(dbms)