sqlmap/tamper/doubleencode.py

16 lines
437 B
Python
Raw Normal View History

2010-10-13 18:29:53 +04:00
import re
from lib.core.convert import urlencode
2010-10-13 18:37:11 +04:00
from lib.core.exception import sqlmapUnsupportedFeatureException
2010-10-13 18:29:53 +04:00
"""
Tampering value -> urlencode(value)
"""
def tamper(place, value):
if value:
2010-10-13 18:37:11 +04:00
if place != "URI":
value = urlencode(value)
else:
raise sqlmapUnsupportedFeatureException, "can't use tampering module 'doubleencode.py' with 'URI' type injections"
2010-10-13 18:29:53 +04:00
return value