DEV Community

宛涵
宛涵

Posted on Originally published at hannes-software.com

PCAP Surgery 0.1.12: Rebuilding a Native Rust PCAP/PCAPNG Editor With Find & Replace, Auto Checksums & Live TX Replay

Most engineers treat .pcap and .pcapng files as read-only evidence because editing them safely by hand is painful. You open a capture in Wireshark to inspect an outage, realize you need to strip customer IP addresses, HTTP Authorization headers, or TLS SNI before handing it to a vendor, and end up writing fragile one-off Scapy scripts that forget to recalculate IPv4/TCP/UDP checksums or silently corrupt packet lengths.

Today we shipped PCAP Surgery 0.1.12 across Linux, Windows, and macOS (Apple Silicon and Intel) with a redesigned native Rust packet-editing workbench, editor-grade Find & Replace, live wire replay, and automatic length/checksum repair.

2-Zone Native Rust Packet Editor Workbench

Version 0.1.12 rebuilds the workspace into a responsive two-zone workbench built for large captures:

  • Collapsible quick-filter and flow rail on the left (filter by HTTP, TCP, TLS, UDP, DNS, ARP, Edited, or Dropped packets and jump straight to individual flows).
  • Protocol-colored Traffic Density Timeline across the top with an auto-paging virtualized packet grid backed by SQLite so scrolling stays snappy.
  • Resizable docked bottom inspector with three focused tabs: Edit Fields, Hex & Diff, and Layers.

Structured L2/L3/L4 Editing, Variable-Length Payload Edits & Automatic Checksums

Instead of hand-counting byte offsets in a hex editor, PCAP Surgery 0.1.12 provides:

  • Editor-grade Find & Replace (Ctrl+F / Ctrl+H) across Filter expressions, ASCII/UTF-8 Text, and raw Hex sequences.
  • 3-column structured header editing for IPv4/IPv6 addresses, MAC addresses, TTL, TCP/UDP ports and flags, plus variable-length L4 payload editing.
  • Automatic length and checksum repair: whenever you rewrite a host header, redact an auth token, or shorten a payload, IPv4, TCP, and UDP lengths and checksums update automatically with live IPv4 ✓ / TCP ✓ verification badges.
  • 16-byte Before/After Hex Diff: highlight modified bytes side-by-side before exporting or replaying.

Floating Batch Packet Rules (Ctrl+Shift+H) & Reusable Recipes

For repeatable sanitization workflows, the floating Batch Packet Rules modal lets you chain deterministic IP/MAC anonymization, host redaction, and packet drops with:

  • Dry-run preflight counts before writing a single byte.
  • One-click privacy presets for vendor escalation packets.
  • Portable .pcapsurgery.json recipes you can commit into incident runbooks.

Live Wire TX Scope, UDP/TCP Replay Studio & Verified Export

Beyond static file surgery, 0.1.12 adds:

  • Packet Replay Studio + Live Wire TX Scope: replay edited UDP or TCP packets against a test target with a logarithmic 0.1×–100× speed fader and real-time TX stream log.
  • Live Packet Capture (via dumpcap/tcpdump on direct desktop builds).
  • Verified .pcap and .pcapng export with SHA-256 audit manifests so you can prove the source capture was never overwritten.
  • Dark & Light themes and 10 interface languages.

Try PCAP Surgery 0.1.12

Top comments (0)