MCPcopy Create free account
hub / github.com/secdev/scapy / XNBytesField

Class XNBytesField

scapy/fields.py:1161–1169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1159
1160
1161class XNBytesField(NBytesField):
1162 def i2repr(self, pkt, x):
1163 # type: (Optional[Packet], int) -> str
1164 if isinstance(x, int):
1165 return '0x%x' % x
1166 # x can be a tuple when coming from struct.unpack (from getfield)
1167 if isinstance(x, (list, tuple)):
1168 return "0x" + "".join("%02x" % b for b in x)
1169 return super(XNBytesField, self).i2repr(pkt, x)
1170
1171
1172class SignedByteField(Field[int, int]):

Callers 3

OptionalAuthClass · 0.90
RTPSSubMessage_DATAClass · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…