This commit is contained in:
Miroslav Stampar 2016-03-28 19:55:33 +02:00
parent 7e55af2811
commit 0245ce6228
2 changed files with 3 additions and 3 deletions

View File

@ -209,9 +209,8 @@ def _saveToHashDB():
_[key].data.update(injection.data) _[key].data.update(injection.data)
hashDBWrite(HASHDB_KEYS.KB_INJECTIONS, _.values(), True) hashDBWrite(HASHDB_KEYS.KB_INJECTIONS, _.values(), True)
_ = hashDBRetrieve(HASHDB_KEYS.KB_ABS_FILE_PATHS, True) or set() _ = hashDBRetrieve(HASHDB_KEYS.KB_ABS_FILE_PATHS, True)
_.update(kb.absFilePaths) hashDBWrite(HASHDB_KEYS.KB_ABS_FILE_PATHS, kb.absFilePaths | (_ if isinstance(_, set) else set()), True)
hashDBWrite(HASHDB_KEYS.KB_ABS_FILE_PATHS, _, True)
if not hashDBRetrieve(HASHDB_KEYS.KB_CHARS): if not hashDBRetrieve(HASHDB_KEYS.KB_CHARS):
hashDBWrite(HASHDB_KEYS.KB_CHARS, kb.chars, True) hashDBWrite(HASHDB_KEYS.KB_CHARS, kb.chars, True)

View File

@ -97,6 +97,7 @@ class HashDB(object):
try: try:
retVal = unserializeObject(retVal) retVal = unserializeObject(retVal)
except: except:
retVal = None
warnMsg = "error occurred while unserializing value for session key '%s'. " % key warnMsg = "error occurred while unserializing value for session key '%s'. " % key
warnMsg += "If the problem persists please rerun with `--flush-session`" warnMsg += "If the problem persists please rerun with `--flush-session`"
logger.warn(warnMsg) logger.warn(warnMsg)