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

Method i2repr

scapy/fields.py:2007–2011  ·  view source on GitHub ↗
(self, pkt, x)

Source from the content-addressed store, hash-verified

2005
2006class _XStrField(Field[bytes, bytes]):
2007 def i2repr(self, pkt, x):
2008 # type: (Optional[Packet], bytes) -> str
2009 if isinstance(x, bytes):
2010 return bytes_hex(x).decode()
2011 return super(_XStrField, self).i2repr(pkt, x)
2012
2013
2014class XStrField(_XStrField, StrField):

Callers

nothing calls this directly

Calls 3

bytes_hexFunction · 0.90
decodeMethod · 0.80
i2reprMethod · 0.45

Tested by

no test coverage detected