Skip to content

Commit 42f518b

Browse files
committed
Minor update for letting unhandledExceptionMessage() do it's job if kb has not yet been initialized
1 parent ffc520b commit 42f518b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/core/common.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,11 @@ def setArch():
386386
# Get methods
387387
@staticmethod
388388
def getForcedDbms():
389-
return aliasToDbmsEnum(kb.forcedDbms)
389+
return aliasToDbmsEnum(kb.get("forcedDbms"))
390390

391391
@staticmethod
392392
def getDbms():
393-
return aliasToDbmsEnum(kb.dbms) if kb.get('dbms') else None
393+
return aliasToDbmsEnum(kb.get("dbms"))
394394

395395
@staticmethod
396396
def getErrorParsedDBMSes():
@@ -406,7 +406,7 @@ def getErrorParsedDBMSes():
406406
fingerprint phase.
407407
"""
408408

409-
return kb.htmlFp if kb.heuristicTest is not None else []
409+
return kb.htmlFp if kb.get("heuristicTest") is not None else []
410410

411411
@staticmethod
412412
def getIdentifiedDbms():
@@ -2557,7 +2557,7 @@ def unhandledExceptionMessage():
25572557
errMsg += "Python version: %s\n" % PYVERSION
25582558
errMsg += "Operating system: %s\n" % PLATFORM
25592559
errMsg += "Command line: %s\n" % " ".join(sys.argv)
2560-
errMsg += "Technique: %s\n" % (enumValueToNameLookup(PAYLOAD.TECHNIQUE, kb.technique) if kb and kb.technique else None)
2560+
errMsg += "Technique: %s\n" % (enumValueToNameLookup(PAYLOAD.TECHNIQUE, kb.technique) if kb.get("technique") else None)
25612561
errMsg += "Back-end DBMS: %s" % ("%s (fingerprinted)" % Backend.getDbms() if Backend.getDbms() is not None else "%s (identified)" % Backend.getIdentifiedDbms())
25622562

25632563
return maskSensitiveData(errMsg)

0 commit comments

Comments
 (0)