sqlmap/tamper/space2comment.py

17 lines
354 B
Python
Raw Normal View History

2010-10-13 18:27:35 +04:00
import re
from lib.core.convert import urldecode
from lib.core.convert import urlencode
"""
2010-10-13 23:51:10 +04:00
' ' -> /**/
2010-10-13 18:27:35 +04:00
"""
def tamper(place, value):
if value:
if place != "URI":
value = urldecode(value)
2010-10-14 00:54:18 +04:00
value = value.replace(" ", "/**/")
2010-10-13 18:27:35 +04:00
if place != "URI":
value = urlencode(value)
return value