Minor bug fix in --resume functionality

This commit is contained in:
Bernardo Damele 2010-01-11 14:16:37 +00:00
parent 4512ef56d1
commit df36eb6d11

View File

@ -131,7 +131,6 @@ def resume(expression, payload):
if not payload: if not payload:
return None return None
expressionUnescaped = unescaper.unescape(expression)
substringQuery = queries[kb.dbms].substring substringQuery = queries[kb.dbms].substring
select = re.search("\ASELECT ", expression, re.I) select = re.search("\ASELECT ", expression, re.I)
@ -156,9 +155,9 @@ def resume(expression, payload):
dataToSessionFile("[%s][%s][%s][%s][%s" % (conf.url, kb.injPlace, conf.parameters[kb.injPlace], expression, resumedValue)) dataToSessionFile("[%s][%s][%s][%s][%s" % (conf.url, kb.injPlace, conf.parameters[kb.injPlace], expression, resumedValue))
if select: if select:
newExpr = expressionUnescaped.replace(regExpr, substringQuery % (regExpr, len(resumedValue) + 1, int(length)), 1) newExpr = expression.replace(regExpr, substringQuery % (regExpr, len(resumedValue) + 1, int(length)), 1)
else: else:
newExpr = substringQuery % (expressionUnescaped, len(resumedValue) + 1, int(length)) newExpr = substringQuery % (expression, len(resumedValue) + 1, int(length))
missingCharsLength = int(length) - len(resumedValue) missingCharsLength = int(length) - len(resumedValue)