sqlmap/tamper/urlencode.py
2010-11-04 10:29:40 +00:00

26 lines
598 B
Python

#!/usr/bin/env python
"""
$Id$
Copyright (c) 2006-2010 sqlmap developers (http://sqlmap.sourceforge.net/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.convert import urlencode
from lib.core.exception import sqlmapUnsupportedFeatureException
from lib.core.priority import PRIORITY
__priority__ = PRIORITY.LOWER
def tamper(value):
"""
Replaces value with urlencode(value)
Example: 'SELECT FIELD FROM TABLE' becomes 'SELECT%20FIELD%20FROM%20TABLE'
"""
if value:
value = urlencode(value, convall=True)
return value