Skip to content

PyPCAPKit v1.5.0b5

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 28 Sep 23:02
· 980 commits to main since this release

What's Changed

💥 Breaking Changes

  • fix(foundation): make register_mh_extension take schema keyword-only (#516) by @JarryShaw in #526
  • fix(corekit): reject a bool where a maker converts an address itself (#508) by @JarryShaw in #539
  • feat(foundation): make subclass registration opt-in for Engine, Reassembly, TraceFlow and Dumper (#514) by @JarryShaw in #547
  • fix(foundation): rename Engine's registry keyword to engine, which works on Python 3.10 (#514) by @JarryShaw in #557
  • fix(corekit): stop a malformed TCP SACK's exception type depending on sys.modules state (#525) by @JarryShaw in #562
  • fix(link,internet): reject a bool at the four remaining maker call sites (#540) by @JarryShaw in #568
  • fix(tcp): set MPTCP.subtype on construction, fix MP_CAPABLE's length/rkey (#566, #567) by @JarryShaw in #579
  • fix(ipv6-route): size the RPL fixed area at 4 octets per RFC 6554 (#564) by @JarryShaw in #590
  • fix(l2tp): refuse a version nibble other than 2, and settle what IP protocol 115 is (#548) by @JarryShaw in #589
  • fix(hopopt,ipv6-opts): size the ILNP nonce with a real ceiling, not a floored one (#601) by @JarryShaw in #607
  • fix(corekit): pad a short field read on the tail, not the head (#604) by @JarryShaw in #621
  • fix(hip): size the SOLUTION parameter as two whole-octet fields (#608) by @JarryShaw in #629
  • fix(corekit): keep SeekableReader's buffer content when truncating it (#622) by @JarryShaw in #633
  • fix(tcp): seed TCP.read's flag accumulator with Enum_Flags(0), not a no-op cast (#616) by @JarryShaw in #634
  • fix(pcap): Frame.len is the on-wire length, cap_len the captured one (#618) by @JarryShaw in #635
  • fix(foundation): close the input stream pcapkit opened, not the caller's (#610) by @JarryShaw in #636
  • fix(protocol): refuse a construction keyword no signature declares (#617) by @JarryShaw in #640
  • fix(corekit): keep SeekableReader's position bookkeeping in step (#643, #644) by @JarryShaw in #663
  • fix(hip): PUZZLE and SOLUTION builders must stop inventing wire-format values (#653, #654, #655) by @JarryShaw in #665
  • fix(httpv2): restore END_STREAM on rebuild, and seed the parsed flag accumulator as Flags (#652, #650) by @JarryShaw in #669
  • fix(dumpkit): a nameless flag member no longer renders as Type::None [0] (#648) by @JarryShaw in #670
  • fix(hip): pad HIP parameters to the record length RFC 7401 gives, not the contents (#651) by @JarryShaw in #664
  • fix(pcapng): bound an option's payload to the area its block declares (#594) by @JarryShaw in #676
  • fix(const): give the six unguarded registries the same bare-ValueError guard by @JarryShaw in #677
  • fix(corekit): refuse truncate on a reader that reports itself unwritable (#645) by @JarryShaw in #680
  • fix(pcapng): keep the captured octets every packet block declares (#646) by @JarryShaw in #683
  • fix(httpv2): keep the payload an unpadded DATA/HEADERS/PUSH_PROMISE declares by @JarryShaw in #691
  • fix(pcapng): stop a negative length reaching a read on a truncated capture (#678) by @JarryShaw in #699
  • fix(hip): correct R1_COUNTER's counter width and LOCATOR_SET's Length unit (#672) (#679) by @JarryShaw in #696
  • fix(corekit): resolve an unassigned enum value instead of raising aenum's ValueError (#701) by @JarryShaw in #706
  • feat(reg)!: split AppType into per-transport registries, dropping the portless rows by @JarryShaw in #754
  • fix(reg)!: reject an out-of-range port in AppType.get, and claim each span by transport by @JarryShaw in #764
  • fix(fields): fall through to the bounded pseudo-member instead of minting (#575) by @JarryShaw in #771
  • fix(const): refuse a multi-bit proto in AppType._dispatch rather than resolving it LSB-first (#759) by @JarryShaw in #783
  • feat(corekit,schema,utilities)!: enforce @Final at runtime on Info and Schema (#778) by @JarryShaw in #788
  • fix(fields): raise ProtocolError, not struct.error, on a negative resolved field length by @JarryShaw in #811
  • feat(reg)!: retype AppType.proto to its own transport, and give register_apptype varargs (#806) by @JarryShaw in #815
  • fix(reg)!: drop TransportProtocol's IntFlag base now that nothing composes by @JarryShaw in #836
  • fix(vendor): stop get() minting; missing fixed for 21 of 105 (#775) by @JarryShaw in #838
  • fix(toolkit): key pyshark link-type resolution on frame.encap_type by @JarryShaw in #850
  • fix(ipx): order Socket.missing range branches narrowest-first by @JarryShaw in #847
  • fix(reg): emit tcpdump legacy link-type names after current ones by @JarryShaw in #848
  • ci: rebuild engine-tests as a Python × engine matrix with three cell outcomes by @JarryShaw in #849
  • feat(corekit): add EnumRegistry base for const registries, convert 5 (#775) by @JarryShaw in #855
  • refactor(const,vendor): move the generated const-enum template onto EnumRegistry (#775) by @JarryShaw in #858
  • fix(corekit): make EnumRegistry.get's no-default marker an identity sentinel (#857) by @JarryShaw in #859
  • refactor(const,vendor): apply the mint/unmint criterion ruling to 82 registries (#775) by @JarryShaw in #861
  • fix(const,vendor): Old Xerox ethertype range shadowed by IEEE802.3 range by @JarryShaw in #865
  • fix(corekit): stop EnumRegistry.get's default from minting by @JarryShaw in #868
  • fix(const,vendor): bring 8 bespoke registries onto EnumRegistry, stop them minting by @JarryShaw in #869
  • fix(const,vendor): give Method's registered members their str payload (#870) by @JarryShaw in #871
  • fix(const,vendor): bring the AppType family onto EnumRegistry, stop it minting (#860) by @JarryShaw in #874

✨ Features

  • feat(protocols): opt-in code= registration with enum-type inference for Protocol/ProtocolBase by @JarryShaw in #570
  • feat(util): have bump_version.py keep CITATION.cff in step with the bump by @JarryShaw in #625
  • feat(reg): expose AppType aliases in repr/str and allow registering them per transport (#807) by @JarryShaw in #837

🐛 Fixes

  • fix(vendor): retire the IPX socket scrape, its data source is gone (#507) by @JarryShaw in #511
  • fix(foundation): let register_extractor_* accept pcapkit's own built-in classes by @JarryShaw in #523
  • fix(vendor): send a descriptive User-Agent and retarget the dead pcapng draft by @JarryShaw in #524
  • fix(protocols): repair all entries that name nothing, and guard the class by @JarryShaw in #527
  • fix(mh): count a CGA extension's 4-octet header in its reported length by @JarryShaw in #528
  • fix(vendor): make the handover_initiate_status crawler reachable (release blocker for make vendor) by @JarryShaw in #531
  • fix(tcp): enforce the SACK length rule its docstring already promised (#519) by @JarryShaw in #535
  • fix(protocols): let from_data rebuild a parsed packet by @JarryShaw in #536
  • fix(vendor): end the manual-intervention wait when nobody can answer it (#522) by @JarryShaw in #542
  • fix(ipv4): terminate the SEC bitmap, reject its terminator bit, and narrow SID to 16 bits by @JarryShaw in #543
  • fix(exports): export the 23 public attributes their package all omitted (#533) by @JarryShaw in #544
  • fix(corekit): reject a signed= that contradicts a field's fixed sign (#545) by @JarryShaw in #549
  • fix(ipv4): three defects in the IPv4 option schemas (#552) by @JarryShaw in #559
  • fix(schema): read the MPTCP option length from bit 8, not bit 1 (#553) by @JarryShaw in #558
  • fix(schema): stop EnumSchema.registry from retaining a lookup miss (#555) by @JarryShaw in #560
  • fix(hip,ipv6-route): stop dropping the ENCRYPTED IV and RPL's pack-time cast (#556) by @JarryShaw in #561
  • fix(tcp): give MPTCP real kind/length fields, repairing pack and parse by @JarryShaw in #565
  • fix(corekit): bound FieldBase.unpack's rjust() padding to a sane ceiling (#554) by @JarryShaw in #569
  • fix(tcp): correct MPTCP option length arithmetic at all six #576 sites by @JarryShaw in #585
  • fix(corekit): bound the total zero padding a parse may synthesise (#573) by @JarryShaw in #593
  • fix(changelog-md): cite a line the entry has, and accept an anchored :rfc: role (#588, #592) by @JarryShaw in #595
  • fix(tcp): resolve the connection flags before building the options (#587) by @JarryShaw in #597
  • fix(corekit): recompute _need_process from the width in force, not once from the placeholder (#591) by @JarryShaw in #598
  • fix(corekit): size the width repair with a real ceiling, not a floored one (#599) by @JarryShaw in #600
  • fix(const): normalise the key get() looks up, and honour its documented default (#582, #583, #584) by @JarryShaw in #596
  • fix(generators): spell TCP_BASE's keys the way TCP.make declares them (#602) by @JarryShaw in #609
  • fix(pcap): seed the frame byte order under the key the reader consults (#605) by @JarryShaw in #614
  • fix(license): start the copyright term at 2017, and drop the end year by @JarryShaw in #630
  • fix(packaging): ship CITATION.cff in the source distribution by @JarryShaw in #631
  • fix(mh): stop the four flag enums recursing on any non-member value (#623) by @JarryShaw in #632
  • fix: import three names used only in string annotations, and correct a false packaging claim (#642) by @JarryShaw in #666
  • fix(tcp): drop the doubled separator from four MPTCP error messages (#649) by @JarryShaw in #671
  • fix(foundation): give no_eof a way to stop, so extract() returns (#620) by @JarryShaw in #639
  • fix(registry): report the protocol-name collision register_protocol hid (#675) by @JarryShaw in #681
  • fix(registry): report the silent schema overwrites, and name what the code-keyed registrars displaced by @JarryShaw in #695
  • fix(registry): disambiguate register_protocol's overwrite warning when two classes share a repr by @JarryShaw in #711
  • fix(pcapng): bound the skip after a journal binary field to one octet by @JarryShaw in #722
  • fix(hip): register R1CounterParameter under HIPv1's code 128 too by @JarryShaw in #721
  • fix(pcapng): walk the journal entry instead of splitting it on b'\n\n' by @JarryShaw in #728
  • fix(registry): add register_protocol's identity guard to sibling registrars by @JarryShaw in #726
  • fix(vendor): derive each crawler's const/ path from vendor/'s own root by @JarryShaw in #741
  • fix(foundation): add the #718 identity guard to the five registrars it missed by @JarryShaw in #742
  • fix(toolkit): parse PyPCAPFile's dotted-decimal IPv4 text, not packed bytes by @JarryShaw in #747
  • fix(engines): un-hexlify pypcapfile frames before decoding them by @JarryShaw in #748
  • fix(lint): reach every const/vendor init.py in isort and drop five stale pylint flags by @JarryShaw in #773
  • fix(reg): cast TransportProtocol.undefined so mypy infers its own type by @JarryShaw in #777
  • fix(dumpkit): escape mapping keys for the plist writer (#772) by @JarryShaw in #784
  • fix(http): reach _guess_version's HTTP/2 arm, and resolve PayloadField names by @JarryShaw in #789
  • fix: strip a systemd journal entry's own block padding, not its data by @JarryShaw in #795
  • fix(http): check the buffer's length, not just the declared one, in HTTP/2's frame guard by @JarryShaw in #802
  • fix(vendor): pass regex flags as flags=, not positional count (#796) by @JarryShaw in #813
  • fix(http): identify the HTTP version before parsing, not by trial and error (#800) by @JarryShaw in #814
  • fix(tcp): repoint TCP:80/8080 at the HTTP version proxy (#682) by @JarryShaw in #821
  • fix(fields): distinguish a malformed template from a negative length in FieldBase.length by @JarryShaw in #827
  • fix(fields): raise ProtocolError for a NumberField negative resolved length (#828) by @JarryShaw in #829
  • fix(corekit): raise ProtocolError for a NumberField negative bit_length (#831) by @JarryShaw in #834
  • fix(reg,corekit): retype the registry NULL sentinel and raise ProtocolError from ModuleDescriptor.klass by @JarryShaw in #835
  • fix(vendor): make the LinkType legacy-sink rule value-aware by @JarryShaw in #854
  • fix(corekit): fall EnumRegistry.get() back to a str key's value (#860) by @JarryShaw in #863
  • fix(const,vendor): return the unregistered member instead of re-entering missing (#866) by @JarryShaw in #867
  • fix(vendor): make main() exit non-zero when any crawler target raises (#872) by @JarryShaw in #873
  • fix(vendor): pin except BaseException and correct a false docstring clause by @JarryShaw in #876
  • fix(const,vendor): stop EtherType and Socket minting on an unrecognised value by @JarryShaw in #878
  • fix(pcapng): repoint TLSKeyLabel at RFC 9850, add ECH_SECRET/ECH_CONFIG by @JarryShaw in #883

♻️ Refactoring

  • refactor: extract duplicated wire-unit arithmetic across mh/ipv6_route/hopopt/ipv6_opts by @JarryShaw in #509
  • refactor: import each *Base class under its own name, not the public one by @JarryShaw in #750
  • refactor(protocols): import ProtocolBase under its own name in the last 54 sites by @JarryShaw in #752
  • refactor(const): convert AppType's six %-style raises to f-strings (#792) by @JarryShaw in #797
  • refactor(vendor): finish the %-to-f-string sweep on the four bespoke templates by @JarryShaw in #803
  • refactor(const): f-string the last three %-formatted repr methods (#804) by @JarryShaw in #817
  • docs(http): fix three stale measurements in the guess_version fallback comment by @JarryShaw in #826
  • refactor(const,vendor): f-string the three remaining %-formatted repr methods by @JarryShaw in #830
  • test(const): key the manufactured-name exemption on the name shape, not on file paths by @JarryShaw in #881

⚙️ CI & Build

  • ci: feed the generated CHANGELOG.md to the release body, and gate its drift by @JarryShaw in #529
  • ci: wire the existing linters into CI as advisory checks by @JarryShaw in #626
  • ci(release): gate every publishing job on a deployment environment (#641) by @JarryShaw in #673
  • ci(unit-tests): raise pytest job timeouts from 30 to 45 minutes by @JarryShaw in #716
  • ci(unit-tests): stop the integration job re-running the unit tier by @JarryShaw in #727
  • ci: parallelise pytest with xdist and drop 3.15 from the blocking matrix by @JarryShaw in #725
  • ci(gate-only): chain the push gate off Unit Tests instead of re-running it by @JarryShaw in #731
  • ci(release): key release notes on the real type labels, not just dependencies by @JarryShaw in #735
  • ci(unit-tests): install DPKT so the dpkt-gated tests actually run by @JarryShaw in #737
  • ci(unit-tests): install crypto, cli and NGAP for their gated tests by @JarryShaw in #740
  • ci(lint): make all three isort lines clean and repin lint.yml's counts by @JarryShaw in #761
  • ci: add a per-engine test job for Scapy, PyShark, PyPCAPFile and pcap-ct by @JarryShaw in #755
  • ci(deps): install the vendor extra on engine-tests, closing HAS_VENDOR_DEPS (#738) by @JarryShaw in #774
  • test: gate test_isort_clean.py visibly and put isort on the test extra by @JarryShaw in #786
  • fix(test): gate the re.sub positional-flag DeprecationWarning test on Python 3.13 by @JarryShaw in #820
  • ci: give the pyshark engine real-capture coverage, and stop a fallback passing as a pass by @JarryShaw in #846
  • ci: add a single aggregate required-check job to unit-tests.yml by @JarryShaw in #856

⚡ Performance

  • perf(corekit): resolve a ModuleDescriptor through sys.modules, not import_module (#574) by @JarryShaw in #586
  • perf: call field.copy() directly instead of copy.copy(self) by @JarryShaw in #733
  • perf(reg): drop the per-member annotation and TransportProtocol.get() calls by @JarryShaw in #769

📝 Documentation

  • docs: set PCAPKIT_SPHINX before importing pcapkit, not after by @JarryShaw in #520
  • docs: add CHANGELOG.rst and render it in the Sphinx docs by @JarryShaw in #521
  • docs: mark the Type Stubs copies of four TypedDicts :no-index: by @JarryShaw in #532
  • docs(hopopt): cite RFC 8200 section 4.2 for the Opt Data Len sentence (#530) by @JarryShaw in #538
  • docs: correct documentation that stated untrue things (#546) by @JarryShaw in #550
  • docs: say in SECURITY.md that hostile captures are a live risk, not a closed one by @JarryShaw in #611
  • docs: repair the Code of Conduct's rendering and refresh CONTRIBUTING by @JarryShaw in #613
  • docs: add CITATION.cff and bring the copyright notice up to date by @JarryShaw in #615
  • docs: adopt Contributor Covenant 3.0 for the Code of Conduct by @JarryShaw in #624
  • docs(readme): trim to a landing page and convert to Markdown by @JarryShaw in #619
  • docs(github): review the non-workflow metadata under .github/ by @JarryShaw in #637
  • docs(changelog): correct the LICENSE history in the #630 entry by @JarryShaw in #638
  • docs(contributing): correct four statements the recent merges falsified by @JarryShaw in #656
  • docs(contributing): the make vermin trap is the opposite of what was recorded by @JarryShaw in #659
  • docs: reconcile the Sphinx directives to the contract-versus-recipe tenet (#684) by @JarryShaw in #694
  • fix(traceflow): qualify the bare Type[Dumper] autodoc references (#709) by @JarryShaw in #712
  • fix(docs): qualify the ambiguous Type refs in the foundation rst tree by @JarryShaw in #714
  • docs(tests): stop stating how many captures are committed (#700) by @JarryShaw in #703
  • docs(foundation): cite the real class statement in the engine-check note by @JarryShaw in #763
  • docs: render #771's two unregistered-member helpers in numbers.rst (#780) by @JarryShaw in #781
  • test: reword PcapngUnescapedKeyTests' claims that #784 falsified by @JarryShaw in #790
  • docs(pcapng): repoint the generator's stale journal-defect citation by @JarryShaw in #793

🧹 Chores

  • chore(examples): stop tracking the four rendered capture reports (#685) by @JarryShaw in #697
  • chore: add isort to Pipfile's dev-packages so make isort resolves it by @JarryShaw in #812
  • chore: generate pyshark's encap-type and filter-name maps from a util script by @JarryShaw in #853

🧪 Tests

  • test: sort sample_path() calls into real source order in the tier guard by @JarryShaw in #510
  • test: pin the truncated-data half of the #431 short-read accommodation by @JarryShaw in #578
  • test: correct docstrings on the #572 truncated-option tests by @JarryShaw in #580
  • test(utilities,foundation): pin the quiet StreamEOFError convention and register_extractor_engine's keyword by @JarryShaw in #577
  • test(tcp): reach the MP_JOIN dispatchers through TCP(), not a hand-written _flags (#603) by @JarryShaw in #612
  • test(tcp): expect the short-read padding on the tail, repairing main (#604) (#621) by @JarryShaw in #627
  • test(tcp): retarget the last assertion pinning the old padding side (#604) by @JarryShaw in #628
  • fix(tests): restore sys.modules after a test installs a stand-in module (#660) by @JarryShaw in #662
  • fix(tests): put sys.modules back after a test loads modules from source (#674) by @JarryShaw in #686
  • fix(tests): keep a faked version and hand-bound stand-ins inside the test that made them (#687, #688) by @JarryShaw in #693
  • fix(tests): derive the nameless-flag probe from each registry's own width (#702) by @JarryShaw in #705
  • fix(tests): complete the warm-up list #693 left resting on someone else's imports by @JarryShaw in #698
  • test: map mypy in MODULE_PROVIDERS and name the module an unmapped lookup wanted by @JarryShaw in #782

👒 Dependencies

  • Scheduled weekly dependency update for week 38 by @pyup-bot in #581

Full Changelog: v1.5.0b3...v1.5.0b5