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

Method escaper

plugins/dbms/mysql/syntax.py:25–29  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

23 """
24
25 def escaper(value):
26 if all(_ < 128 for _ in getOrds(value)):
27 return "0x%s" % getUnicode(binascii.hexlify(getBytes(value)))
28 else:
29 return "CONVERT(0x%s USING utf8)" % getUnicode(binascii.hexlify(getBytes(value, "utf8")))
30
31 return Syntax._escape(expression, quote, escaper)

Callers

nothing calls this directly

Calls 3

getOrdsFunction · 0.90
getUnicodeFunction · 0.90
getBytesFunction · 0.90

Tested by

no test coverage detected