You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(foundation): third-party engines replace a user's verbose callback with their own printer #1874
Extractor.__init__ sets _flag_v = True and stores the callable when verbose is one (pcapkit/foundation/extraction.py:1293-1295). But each third-party engine then does if ext._flag_v: ext._vfunc = lambda e, f: print(...). That happens in foundation/engines/scapy.py:387-391, dpkt.py:~461, pyshark.py:~262, pypcap.py:~319, pcap_ct.py:~406 and pypcapfile.py:~227. So on those engines a user's own verbose= callback is silently replaced by the engine's print. Only the built-in PCAP and PCAP-NG engines keep it.
Fix: install an engine's default printer only when verbose=True was passed as a bool, and keep a user callable as given. The test should run a non-default engine with a recording callback and assert the callback is called for every frame.
Activity
fix(foundation): keep a user's verbose callback on every engine (#1874)
docs(foundation): teach custom engines to keep a user's verbose callb…
fix(foundation): keep a user's verbose callback on every engine (#1874)…