Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f8c04ce

Browse files
committed
Minor bug fix
1 parent 2ac8deb commit f8c04ce

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

lib/controller/checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def checkSqlInjection(place, parameter, value):
149149

150150
continue
151151

152-
if getErrorParsedDBMSes() and dbms not in getErrorParsedDBMSes() and kb.skipOthersDbms is None:
152+
if len(getErrorParsedDBMSes()) > 0 and dbms not in getErrorParsedDBMSes() and kb.skipOthersDbms is None:
153153
msg = "parsed error message(s) showed that the "
154154
msg += "back-end DBMS could be '%s'. " % getErrorParsedDBMSesFormatted()
155155
msg += "Do you want to skip test payloads specific for other DBMSes? [Y/n]"

lib/core/common.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,10 @@ def getErrorParsedDBMSesFormatted():
297297

298298
htmlParsed = ""
299299

300-
if not kb.htmlFp:
300+
if len(kb.htmlFp) == 0:
301301
return None
302-
303-
if len(kb.htmlFp) == 1:
304-
htmlVer = kb.htmlFp[0]
305-
htmlParsed = htmlVer
302+
elif len(kb.htmlFp) == 1:
303+
htmlParsed = kb.htmlFp[0]
306304
elif len(kb.htmlFp) > 1:
307305
htmlParsed = " or ".join([htmlFp for htmlFp in kb.htmlFp])
308306

@@ -2047,7 +2045,7 @@ def getIdentifiedDBMS():
20472045
dbms = kb.dbms
20482046
elif conf.dbms is not None:
20492047
dbms = conf.dbms
2050-
elif getErrorParsedDBMSes() is not None:
2048+
elif len(getErrorParsedDBMSes()) > 0:
20512049
dbms = getErrorParsedDBMSes()[0]
20522050

20532051
return aliasToDbmsEnum(dbms)

0 commit comments

Comments
 (0)