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

Method hexraw

scapy/plist.py:401–413  ·  view source on GitHub ↗

Same as nsummary(), except that if a packet has a Raw layer, it will be hexdumped # noqa: E501 lfilter: a truth function that decides whether a packet must be displayed

(self, lfilter=None)

Source from the content-addressed store, hash-verified

399 hexdump(self._elt2pkt(p))
400
401 def hexraw(self, lfilter=None):
402 # type: (Optional[Callable[..., bool]]) -> None
403 """Same as nsummary(), except that if a packet has a Raw layer, it will be hexdumped # noqa: E501
404 lfilter: a truth function that decides whether a packet must be displayed""" # noqa: E501
405 for i, res in enumerate(self.res):
406 p = self._elt2pkt(res)
407 if lfilter is not None and not lfilter(p):
408 continue
409 print("%s %s %s" % (conf.color_theme.id(i, fmt="%04i"),
410 p.sprintf("%.time%"),
411 self._elt2sum(res)))
412 if p.haslayer(conf.raw_layer):
413 hexdump(p.getlayer(conf.raw_layer).load) # type: ignore
414
415 def hexdump(self, lfilter=None):
416 # type: (Optional[Callable[..., bool]]) -> None

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected