new tampering module

This commit is contained in:
Miroslav Stampar 2010-10-13 14:27:35 +00:00
parent 2dc297530a
commit e81a293d20

17
tamper/space2comment.py Normal file
View File

@ -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