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

Method hexdump

scapy/plist.py:415–426  ·  view source on GitHub ↗

Same as nsummary(), except that packets are also hexdumped lfilter: a truth function that decides whether a packet must be displayed

(self, lfilter=None)

Source from the content-addressed store, hash-verified

413 hexdump(p.getlayer(conf.raw_layer).load) # type: ignore
414
415 def hexdump(self, lfilter=None):
416 # type: (Optional[Callable[..., bool]]) -> None
417 """Same as nsummary(), except that packets are also hexdumped
418 lfilter: a truth function that decides whether a packet must be displayed""" # noqa: E501
419 for i, res in enumerate(self.res):
420 p = self._elt2pkt(res)
421 if lfilter is not None and not lfilter(p):
422 continue
423 print("%s %s %s" % (conf.color_theme.id(i, fmt="%04i"),
424 p.sprintf("%.time%"),
425 self._elt2sum(res)))
426 hexdump(p)
427
428 def padding(self, lfilter=None):
429 # type: (Optional[Callable[..., bool]]) -> None

Callers

nothing calls this directly

Calls 4

_elt2pktMethod · 0.95
_elt2sumMethod · 0.95
hexdumpFunction · 0.90
sprintfMethod · 0.45

Tested by

no test coverage detected