mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 04:53:48 +03:00
bug fix for mssqlserver escape
This commit is contained in:
parent
e4d3190f41
commit
f909ecb369
|
@ -54,7 +54,7 @@ class Syntax(GenericSyntax):
|
|||
break
|
||||
|
||||
firstIndex = index
|
||||
index = expression[firstIndex:].find("))")
|
||||
index = expression[firstIndex:].find(")")
|
||||
|
||||
if index == -1:
|
||||
raise sqlmapSyntaxException("Unenclosed ) in '%s'" % expression)
|
||||
|
@ -63,9 +63,9 @@ class Syntax(GenericSyntax):
|
|||
old = expression[firstIndex:lastIndex]
|
||||
oldUpper = old.upper()
|
||||
oldUpper = oldUpper.replace("CHAR(", "").replace(")", "")
|
||||
oldUpper = oldUpper.split("+")
|
||||
|
||||
escaped = "'%s'" % "".join([chr(int(char)) for char in oldUpper])
|
||||
escaped = "'%s'" % chr(int(oldUpper))
|
||||
expression = expression.replace(old, escaped)
|
||||
|
||||
expression = expression.replace("'+'", "")
|
||||
return expression
|
||||
|
|
Loading…
Reference in New Issue
Block a user