From 2af8835a9432788e423123d4526b7c556b58f9bc Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 7 Dec 2010 10:57:32 +0000 Subject: [PATCH] fix for a bug reported by ToR (origValue = paramDict[kb.injection.parameter] -> KeyError in resume with missing injection parameter) --- lib/core/session.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/core/session.py b/lib/core/session.py index c30c84872..df73183ae 100644 --- a/lib/core/session.py +++ b/lib/core/session.py @@ -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])