Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1a9aabf

Browse files
committed
Minor fix
1 parent c6cd8ae commit 1a9aabf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tamper/charunicodeencode.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22

33
"""
4-
$Id: charencode.py 2035 2010-10-16 21:33:15Z inquisb $
4+
$Id$
55
66
Copyright (c) 2006-2010 sqlmap developers (http://sqlmap.sourceforge.net/)
77
See the file 'doc/COPYING' for copying permission
@@ -13,7 +13,7 @@
1313

1414
def 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])

0 commit comments

Comments
 (0)