fix for a bug reported by ToR (origValue = paramDict[kb.injection.parameter] -> KeyError in resume with missing injection parameter)

This commit is contained in:
Miroslav Stampar 2010-12-07 10:57:32 +00:00
parent 3d87489de5
commit 2af8835a94

View File

@ -348,11 +348,16 @@ def resumeConfKb(expression, url, value):
elif expression == "Injection data" and url == conf.url:
injection = base64unpickle(value[:-1])
kb.injections.append(injection)
logMsg = "resuming injection data from session file"
logger.info(logMsg)
if injection.parameter in conf.paramDict[injection.place]:
kb.injections.append(injection)
else:
warnMsg = "there is an injection in %s parameter '%s' " % (injection.place, injection.parameter)
warnMsg += "but you did not provided it this time"
logger.warn(warnMsg)
elif expression == "Boolean-based blind injection" and url == conf.url:
kb.booleanTest = unSafeFormatString(value[:-1])