From c36cbbb3aeedc73cf89ecd5d2368daaa5ceca662 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 24 Feb 2012 14:54:10 +0000 Subject: [PATCH] minor fix --- lib/core/common.py | 4 ++-- lib/techniques/blind/inference.py | 2 +- lib/techniques/error/use.py | 2 +- lib/techniques/union/use.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index b4e344da0..e322452b8 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3192,9 +3192,9 @@ def hashDBWrite(key, value, serialize=False): conf.hashDB.write(key, value, serialize) -def hashDBRetrieve(key, unserialize=False): +def hashDBRetrieve(key, unserialize=False, checkConf=False): """ Helper function for restoring session data from HashDB """ - return conf.hashDB.retrieve(key, unserialize) if not any([conf.flushSession, conf.freshQueries, not kb.resumeValues]) else None + return conf.hashDB.retrieve(key, unserialize) if kb.resumeValues and not (checkConf and any([conf.flushSession, conf.freshQueries])) else None diff --git a/lib/techniques/blind/inference.py b/lib/techniques/blind/inference.py index e33ab9d23..727f27bfd 100644 --- a/lib/techniques/blind/inference.py +++ b/lib/techniques/blind/inference.py @@ -59,7 +59,7 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None abortedFlag = False asciiTbl = getCharset(charsetType) timeBasedCompare = (kb.technique in (PAYLOAD.TECHNIQUE.TIME, PAYLOAD.TECHNIQUE.STACKED)) - retVal = hashDBRetrieve(expression) + retVal = hashDBRetrieve(expression, checkConf=True) if retVal: if PARTIAL_VALUE_MARKER in retVal: diff --git a/lib/techniques/error/use.py b/lib/techniques/error/use.py index 6b90644be..f4f923091 100644 --- a/lib/techniques/error/use.py +++ b/lib/techniques/error/use.py @@ -45,7 +45,7 @@ from lib.core.unescaper import unescaper from lib.request.connect import Connect as Request def __oneShotErrorUse(expression, field): - retVal = hashDBRetrieve(expression) + retVal = hashDBRetrieve(expression, checkConf=True) threadData = getCurrentThreadData() threadData.resumed = retVal is not None diff --git a/lib/techniques/union/use.py b/lib/techniques/union/use.py index 814b10ab0..9a921f326 100644 --- a/lib/techniques/union/use.py +++ b/lib/techniques/union/use.py @@ -45,7 +45,7 @@ from lib.core.unescaper import unescaper from lib.request.connect import Connect as Request def __oneShotUnionUse(expression, unpack=True, limited=False): - retVal = hashDBRetrieve(expression) + retVal = hashDBRetrieve(expression, checkConf=True) threadData = getCurrentThreadData() threadData.resumed = retVal is not None