sqlmap/tamper/space2comment.py
2010-10-13 19:51:10 +00:00

18 lines
395 B
Python

import re
from lib.core.convert import urldecode
from lib.core.convert import urlencode
"""
' ' -> /**/
"""
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