mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
29 lines
780 B
Python
29 lines
780 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.common import backend
|
|
from lib.core.datatype import advancedDict
|
|
|
|
class Unescaper(advancedDict):
|
|
def unescape(self, expression, quote=True, dbms=None):
|
|
identifiedDbms = backend.getIdentifiedDbms()
|
|
|
|
if not expression:
|
|
return expression
|
|
elif "WAITFOR DELAY " in expression:
|
|
return expression
|
|
elif dbms is not None:
|
|
return self[dbms](expression, quote=quote)
|
|
elif identifiedDbms is not None:
|
|
return self[identifiedDbms](expression, quote=quote)
|
|
else:
|
|
return expression
|
|
|
|
unescaper = Unescaper()
|