From e81a293d20f8f0c5f0e0a1bb665b9414927a55e5 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 13 Oct 2010 14:27:35 +0000 Subject: [PATCH] new tampering module --- tamper/space2comment.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tamper/space2comment.py diff --git a/tamper/space2comment.py b/tamper/space2comment.py new file mode 100644 index 000000000..e07a9c64e --- /dev/null +++ b/tamper/space2comment.py @@ -0,0 +1,17 @@ +import re + +from lib.core.convert import urldecode +from lib.core.convert import urlencode + +""" +Tampering ' ' -> /**/ +""" +def tamper(place, value): + if value: + if place != "URI": + value = urldecode(value) + while value.find(" ") > -1: + value = value.replace(" ", "/**/") + if place != "URI": + value = urlencode(value) + return value