From 2a2f94927573fa617ab0509fa26ceeaea9a1bd12 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Sun, 31 Oct 2010 12:20:38 +0000 Subject: [PATCH] Minor bug fix --- lib/core/agent.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index 56bca45c6..4a37bd63a 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -624,13 +624,15 @@ class Agent: if inpStr: if urlencode_: - regObj = getCompiledRegex("%s(?P.*?)%s" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER)) + regObj = getCompiledRegex("(?P%s.*?%s)" % (PAYLOAD_DELIMITER, PAYLOAD_DELIMITER)) for match in regObj.finditer(inpStr): - retVal = retVal.replace(match.group("result"), urlencode(match.group("result"), convall=True)) + retVal = retVal.replace(match.group("result"), urlencode(match.group("result").strip(PAYLOAD_DELIMITER), convall=True)) else: retVal = retVal.replace(PAYLOAD_DELIMITER, '') + print retVal + return retVal def extractPayload(self, inpStr):