minor update

This commit is contained in:
Miroslav Stampar 2012-01-30 13:20:33 +00:00
parent 46f42f2fe4
commit f8ae0e5272
2 changed files with 2 additions and 3 deletions

View File

@ -8,6 +8,7 @@ See the file 'doc/COPYING' for copying permission
"""
from lib.core.exception import sqlmapSyntaxException
from plugins.generic.syntax import Syntax as GenericSyntax
class Syntax(GenericSyntax):
@ -30,7 +31,6 @@ class Syntax(GenericSyntax):
lastIndex = firstIndex + index
old = "'%s'" % expression[firstIndex:lastIndex]
#unescaped = "("
unescaped = ""
for i in xrange(firstIndex, lastIndex):

View File

@ -31,11 +31,10 @@ class Syntax(GenericSyntax):
lastIndex = firstIndex + index
old = "'%s'" % expression[firstIndex:lastIndex]
#unescaped = "("
unescaped = ""
for i in xrange(firstIndex, lastIndex):
unescaped += "CHAR(%d)" % (ord(expression[i]))
unescaped += "%s(%d)" % ("CHAR" if ord(expression[i]) < 256 else "TO_UNICHAR", ord(expression[i]))
if i < lastIndex - 1:
unescaped += "+"