MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / escape

Method escape

lib/core/unescaper.py:13–33  ·  view source on GitHub ↗
(self, expression, quote=True, dbms=None)

Source from the content-addressed store, hash-verified

11
12class Unescaper(AttribDict):
13 def escape(self, expression, quote=True, dbms=None):
14 if expression is None:
15 return expression
16
17 for exclude in EXCLUDE_UNESCAPE:
18 if exclude in expression:
19 return expression
20
21 identifiedDbms = Backend.getIdentifiedDbms()
22
23 if dbms is not None:
24 retVal = self[dbms](expression, quote=quote)
25 elif identifiedDbms is not None and identifiedDbms in self:
26 retVal = self[identifiedDbms](expression, quote=quote)
27 else:
28 retVal = expression
29
30 # e.g. inference comparison for '
31 retVal = retVal.replace("'''", "''''")
32
33 return retVal
34
35unescaper = Unescaper()

Callers 15

addMethod · 0.45
pivotDumpTableFunction · 0.45
_Function · 0.45
startFunction · 0.45
heuristicCheckDbmsFunction · 0.45
directFunction · 0.45
queryPageMethod · 0.45
_adjustParameterMethod · 0.45
_randomizeParameterMethod · 0.45
_Method · 0.45
_Function · 0.45
processResponseFunction · 0.45

Calls 2

getIdentifiedDbmsMethod · 0.80
replaceMethod · 0.45

Tested by 2

_findUnionCharCountFunction · 0.36
_unionPositionFunction · 0.36