MCPcopy Create free account
hub / github.com/HexHive/NASS / gef_pystring

Function gef_pystring

tools/gef.py:1811–1816  ·  view source on GitHub ↗

Returns a sanitized version as string of the bytes list given in input.

(x: bytes)

Source from the content-addressed store, hash-verified

1809
1810
1811def gef_pystring(x: bytes) -> str:
1812 """Returns a sanitized version as string of the bytes list given in input."""
1813 res = str(x, encoding="utf-8")
1814 substs = [("\n", "\\n"), ("\r", "\\r"), ("\t", "\\t"), ("\v", "\\v"), ("\b", "\\b"), ]
1815 for x, y in substs: res = res.replace(x, y)
1816 return res
1817
1818
1819def gef_pybytes(x: str) -> bytes:

Callers 6

gef_execute_externalFunction · 0.85
do_invokeMethod · 0.85
search_shellcodeMethod · 0.85
do_invokeMethod · 0.85
gef.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected