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

Skip to content

Commit bcdba7b

Browse files
committed
Dealing with rare cases when getIdentifiedDbms is needed prior to DBMS isfingerprinted and there are multiples of dbmses inside details
1 parent c1b8226 commit bcdba7b

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

lib/controller/checks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,9 @@ def genCmpPayload():
491491
if hasattr(test, "details"):
492492
for dKey, dValue in test.details.items():
493493
if dKey == "dbms":
494+
injection.dbms = dValue
494495
if not isinstance(dValue, list):
495-
injection.dbms = Backend.setDbms(dValue)
496+
Backend.setDbms(dValue)
496497
else:
497498
Backend.forceDbms(dValue[0], True)
498499
elif dKey == "dbms_version" and injection.dbms_version is None and not conf.testFilter:

lib/core/common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,8 @@ def getIdentifiedDbms():
427427
dbms = conf.dbms
428428
elif len(Backend.getErrorParsedDBMSes()) > 0:
429429
dbms = Backend.getErrorParsedDBMSes()[0]
430+
elif kb.injection.dbms:
431+
dbms = unArrayizeValue(kb.injection.dbms)
430432

431433
return aliasToDbmsEnum(dbms)
432434

0 commit comments

Comments
 (0)