MCPcopy Index your code
hub / github.com/secdev/scapy / sane

Function sane

scapy/utils.py:262–274  ·  view source on GitHub ↗
(x, color=False)

Source from the content-addressed store, hash-verified

260
261
262def sane(x, color=False):
263 # type: (AnyStr, bool) -> str
264 r = ""
265 for i in x:
266 j = orb(i)
267 if (j < 32) or (j >= 127):
268 if color:
269 r += conf.color_theme.not_printable(".")
270 else:
271 r += "."
272 else:
273 r += chr(j)
274 return r
275
276
277@conf.commands.register

Callers 4

i2reprMethod · 0.90
hexdumpFunction · 0.85
hexstrFunction · 0.85
hexdiffFunction · 0.85

Calls 1

orbFunction · 0.90

Tested by

no test coverage detected