TShark
$ tshark Foundation High Risktshark brings Wireshark's deep protocol dissectors to the CLI for live capture and offline .pcap inspection (tshark -r cap.pcap -Y http). Stands out for agent workflows thanks to -T json, -T ek (NDJSON), and -T fields -e <field> projection paired with -Y display filters and -c packet bounds.
brew install wireshark Dissects local .pcap captures and live interfaces across thousands of protocols (tshark -T fields, tshark -T json); no MCP tool matches Wireshark's dissector coverage.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports -T json, -T ek (NDJSON), -T fields -e field projection, -Y display filters, and -c limits cleanly without TTY prompts.
- Native
-T json/-T ekand-T fields -efield filtering - Bounded
-ccapture and-roffline inspection
Offline -r inspection is safe, while live capture requires dumpcap/ChmodBPF permissions and can expose sensitive plaintext or decrypted TLS payloads.
- Live capture requires elevated privileges;
-T jsoncan leak huge payload dumps
Cross-platform across macOS (brew install wireshark), Linux (tshark package), and Windows.
- Available via Homebrew, Linux repos, and Windows installers
Unmatched protocol dissection depth across HTTP/2, HTTP/3, TLS, DNS, gRPC, and thousands of network protocols.
- Wireshark's full dissector engine in CLI form
Flagship Wireshark Foundation project (wireshark/wireshark) under GPL-2.0.
- Official Wireshark Foundation repository
Extensive tshark(1) man page, display filter reference, and tshark -G fields schema introspection.
- Official man pages and
tshark -G fieldsprotocol registry
Security, Auth & Guardrails
No login credentials required; optionally reads SSLKEYLOGFILE or Wireshark config profiles to decrypt TLS sessions.
Free, GPL-2.0 open-source software maintained by the Wireshark Foundation.
# TShark Agent Rules - Prefer `-T fields -e <field>` or `-T ek` with `-Y <filter>` and `-c <count>` because `-T json` on unfiltered captures easily overflows agent context windows. - Use `-r <file>` for unprivileged offline inspection; treat live `-i` capture and `SSLKEYLOGFILE` decryption as high-sensitivity operations.
Agent-Ready Command Recipes
Safe Read-Only Queries
tshark -r cap.pcap -Y http.request -T json -c 20
Filters offline cap.pcap for HTTP requests (-Y http.request) and emits up to 20 dissected packets as JSON (-T json).
tshark -r cap.pcap -Y tls.handshake.extensions_server_name -T fields -e frame.number -e ip.dst -e tls.handshake.extensions_server_name
Uses -T fields -e ... to output compact tab-separated columns instead of huge JSON trees.
Controlled Writes & Previews
tshark -i lo0 -c 50 -w cap.pcap
Captures 50 packets on lo0 via dumpcap and saves them to cap.pcap.
Strengths for Agents
- +
-T fields -e <field>and-T ek/-T jsonmake deep packet fields directly consumable by agents. - +
tshark -G fieldsexposes the exact filter/field names for self-describing queries.
Caveats & Pitfalls
- ! Unfiltered
-T jsonproduces massive JSON trees—always pair with-Yand-cor-T fields. - ! Installing via
brew install wiresharkpulls the full Wireshark cask/dependencies on macOS.