| Crates.io | termshark |
| lib.rs | termshark |
| version | 0.1.4 |
| created_at | 2025-10-12 10:20:57.581057+00 |
| updated_at | 2025-10-16 02:33:01.051243+00 |
| description | 🦈 WireShark in the terminal |
| homepage | |
| repository | https://github.com/PRO-2684/termshark |
| max_upload_size | |
| id | 1879149 |
| size | 158,541 |
WireShark in the terminal. Note that this is a toy project, with a lot of features missing.
libpcap-dev on Debian, or libpcap-devel on Fedora.C:\Windows\System32\Npcap to your PATH and restart your shell.libpcap should already be installed.binstallcargo binstall termshark
Navigate to the Releases page and download respective binary for your platform. Make sure to give it execute permissions.
You'll also need Npcap SDK on Windows.
git clone https://github.com/PRO-2684/termshark.git
cd termshark
cargo build --release
# The binary will be available at ./target/release/termshark
sudo ./termshark capture # To capture from default device
Alternatively, you can configure with setcap, if you want to capture without root.
keyevent_to_input_request in event.rs for more details.The filter uses a GitHub-like syntax, i.e. search terms and key:value pairs:
searchterm protocol:tcp source:192.168.1.1 length:>1000
Supported filters:
protocol / proto: Filter by protocol (e.g., tcp, udp, icmp)source / src: Filter by source IP address (exact match)destination / dest / dst: Filter by destination IP address (exact match)length / len: Filter by packet length (supports >, <, ranges)Examples:
protocol:tcp,udp # TCP or UDP packets
source:192.168.1.100 # From specific source
protocol:tcp length:>1000 # Large TCP packets
HTTP source:192.168.1.1 # Traffic containing "HTTP" from source
See FILTER_SYNTAX.md for detailed documentation.
$ termshark --help
Usage: termshark <command> [<args>]
🦈 WireShark in the terminal.
Options:
--help, help display usage information
Commands:
capture Capture and inspect packets from a device.
list List available devices.
load Load and inspect packets from a file.
Here's a list of sample packets for testing. All of them are taken from WireShark wiki, so feel free to visit it for more.
HTTP.pcap: From http.capICMP.pcap: From ipv4frags.pcapIGMP.pcap: From IGMP-dataset.pcap