File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env python
22
33"""
4- $Id: charencode.py 2035 2010-10-16 21:33:15Z inquisb $
4+ $Id$
55
66Copyright (c) 2006-2010 sqlmap developers (http://sqlmap.sourceforge.net/)
77See the file 'doc/COPYING' for copying permission
1313
1414def tamper (place , value ):
1515 """
16- Replaces value with urlencode of non-encoded chars in value
16+ Replaces value with unicode- urlencode of non-encoded chars in value
1717 Example: 'SELECT%20FIELD%20FROM%20TABLE' becomes '%u0053%u0045%u004c%u0045%u0043%u0054%u0020%u0046%u0049%u0045%u004c%u0044%u0020%u0046%u0052%u004f%u004d%u0020%u0054%u0041%u0042%u004c%u0045'
1818 """
1919
@@ -26,7 +26,7 @@ def tamper(place, value):
2626
2727 while i < len (value ):
2828 if value [i ] == '%' and (i < len (value ) - 2 ) and value [i + 1 ] in string .hexdigits and value [i + 2 ] in string .hexdigits :
29- retVal += value [i :i + 3 ]
29+ retVal += "%%u00%s" % value [i + 1 :i + 3 ]
3030 i += 3
3131 else :
3232 retVal += '%%u00%X' % ord (value [i ])
You can’t perform that action at this time.
0 commit comments