Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2af8835

Browse files
committed
fix for a bug reported by ToR (origValue = paramDict[kb.injection.parameter] -> KeyError in resume with missing injection parameter)
1 parent 3d87489 commit 2af8835

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

lib/core/session.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,16 @@ def resumeConfKb(expression, url, value):
348348

349349
elif expression == "Injection data" and url == conf.url:
350350
injection = base64unpickle(value[:-1])
351-
kb.injections.append(injection)
352-
353351
logMsg = "resuming injection data from session file"
354352
logger.info(logMsg)
355353

354+
if injection.parameter in conf.paramDict[injection.place]:
355+
kb.injections.append(injection)
356+
else:
357+
warnMsg = "there is an injection in %s parameter '%s' " % (injection.place, injection.parameter)
358+
warnMsg += "but you did not provided it this time"
359+
logger.warn(warnMsg)
360+
356361
elif expression == "Boolean-based blind injection" and url == conf.url:
357362
kb.booleanTest = unSafeFormatString(value[:-1])
358363

0 commit comments

Comments
 (0)