Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

TShark

$ tshark Foundation High Risk
Wireshark · Browser & Web · GPL-2.0 · macos / linux / windows

tshark 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.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
brew install wireshark
CLI vs MCP Decision CLI Only

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

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

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 ek and -T fields -e field filtering
  • Bounded -c capture and -r offline inspection
Trust & Safety 17 / 25

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 json can leak huge payload dumps
Setup & Portability 13 / 15

Cross-platform across macOS (brew install wireshark), Linux (tshark package), and Windows.

  • Available via Homebrew, Linux repos, and Windows installers
Utility & Efficiency 15 / 15

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
Maintenance & Lineage 10 / 10

Flagship Wireshark Foundation project (wireshark/wireshark) under GPL-2.0.

  • Official Wireshark Foundation repository
Docs & Verifiability 9 / 10

Extensive tshark(1) man page, display filter reference, and tshark -G fields schema introspection.

  • Official man pages and tshark -G fields protocol registry

Security, Auth & Guardrails

Auth Modes
No Auth Config File
Credential Storage

No login credentials required; optionally reads SSLKEYLOGFILE or Wireshark config profiles to decrypt TLS sessions.

Side Effects
Read-Only Local Write
Cost & Quotas

Free, GPL-2.0 open-source software maintained by the Wireshark Foundation.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

Extract HTTP requests from pcap as JSON
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).

Project TLS SNI hostnames with field filtering
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

Capture 50 loopback packets cleanly to pcap
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 json make deep packet fields directly consumable by agents.
  • + tshark -G fields exposes the exact filter/field names for self-describing queries.

Caveats & Pitfalls

  • ! Unfiltered -T json produces massive JSON trees—always pair with -Y and -c or -T fields.
  • ! Installing via brew install wireshark pulls the full Wireshark cask/dependencies on macOS.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI