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

Method nzpadding

scapy/plist.py:442–457  ·  view source on GitHub ↗

Same as padding() but only non null padding

(self, lfilter=None)

Source from the content-addressed store, hash-verified

440 )
441
442 def nzpadding(self, lfilter=None):
443 # type: (Optional[Callable[..., bool]]) -> None
444 """Same as padding() but only non null padding"""
445 for i, res in enumerate(self.res):
446 p = self._elt2pkt(res)
447 if p.haslayer(conf.padding_layer):
448 pad = p.getlayer(conf.padding_layer).load # type: ignore
449 if pad == pad[:1] * len(pad):
450 continue
451 if lfilter is None or lfilter(p):
452 print("%s %s %s" % (conf.color_theme.id(i, fmt="%04i"),
453 p.sprintf("%.time%"),
454 self._elt2sum(res)))
455 hexdump(
456 p.getlayer(conf.padding_layer).load # type: ignore
457 )
458
459 def conversations(self,
460 getsrcdst=None, # type: Optional[Callable[[Packet], Tuple[Any, ...]]] # noqa: E501

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected