diff --git a/lib/core/common.py b/lib/core/common.py index 1cc38df59..a97d49649 100755 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3852,7 +3852,7 @@ def hashDBRetrieve(key, unserialize=False, checkConf=False): _ = "%s%s%s" % (conf.url or "%s%s" % (conf.hostname, conf.port), key, HASHDB_MILESTONE_VALUE) retVal = conf.hashDB.retrieve(_, unserialize) if kb.resumeValues and not (checkConf and any((conf.flushSession, conf.freshQueries))) else None - if not kb.inferenceMode and not kb.fileReadMode and any(_ in (retVal or "") for _ in (PARTIAL_VALUE_MARKER, PARTIAL_HEX_VALUE_MARKER)): + if not kb.inferenceMode and not kb.fileReadMode and isinstance(retVal, basestring) and any(_ in retVal for _ in (PARTIAL_VALUE_MARKER, PARTIAL_HEX_VALUE_MARKER)): retVal = None return retVal diff --git a/lib/core/option.py b/lib/core/option.py index 4fcebecc7..38654ee8d 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1915,6 +1915,7 @@ def _setKnowledgeBaseAttributes(flushAll=True): kb.timeValidCharsRun = 0 kb.uChar = NULL kb.unionDuplicates = False + kb.whereCollectTimes = False kb.xpCmdshellAvailable = False if flushAll: diff --git a/plugins/generic/entries.py b/plugins/generic/entries.py index 6289555c6..5c83de4a4 100644 --- a/plugins/generic/entries.py +++ b/plugins/generic/entries.py @@ -19,7 +19,9 @@ from lib.core.common import isListLike from lib.core.common import isNoneValue from lib.core.common import isNumPosStrValue from lib.core.common import isTechniqueAvailable +from lib.core.common import popValue from lib.core.common import prioritySortColumns +from lib.core.common import pushValue from lib.core.common import readInput from lib.core.common import safeSQLIdentificatorNaming from lib.core.common import unArrayizeValue @@ -234,6 +236,10 @@ class Entries: query = whereQuery(query) + if conf.dumpWhere: + kb.whereResponseTimes = True + pushValue(kb.responseTimes) + count = inject.getValue(query, union=False, error=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS) lengths = {} @@ -322,6 +328,10 @@ class Entries: warnMsg = "Ctrl+C detected in dumping phase" logger.warn(warnMsg) + if conf.dumpWhere: + kb.responseTimes = popValue() + kb.whereResponseTimes = False + for column, columnEntries in entries.items(): length = max(lengths[column], len(column))