minor fix

This commit is contained in:
Miroslav Stampar 2012-02-24 14:54:10 +00:00
parent 26b33154ab
commit c36cbbb3ae
4 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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