SkillAgentSearch skills...

Rshark

Simple Packet Monitoring Tool

Install / Use

/learn @pesos/Rshark
About this skill

Quality Score

0/100

Category

Operations

Supported Platforms

Universal

README

Rshark

CI

A terminal UI based packet monitoring tool written in Rust.

Example UI

Installation

Works only on Unix-like OSes for now.

Prerequisites: rust and cargo.

  1. git clone this repository.
  2. cd rshark
  3. cargo install --path . should install the binary. Make sure $HOME/.cargo/bin is in your $PATH variable.

Usage

USAGE:
    rshark [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -i, --interface <INTERFACE>    Sets network interface to capture packets on

Note that since rshark sniffs network packets, it requires root privileges

How to Run

  1. Find a network device to monitor. To find one using OSX:

networksetup -listallhardwareports

  1. Run the binary on a device, e.g. WiFi, must run as root. sudo cargo run -- -i en0

Keyboard bindings

| key | alternate | description | |-----|-----------|-------------| |<kbd>k</kbd> | <kbd></kbd> | move cursor up | |<kbd>j</kbd> | <kbd></kbd> | move cursor down | |<kbd>g</kbd> | | move cursor at begin | |<kbd>G</kbd> | | move cursor at end | |<kbd>ESC</kbd> | <kbd></kbd> | reset cursor position | |<kbd>q</kbd> | <kbd>CTRL</kbd>+<kbd>C</kbd> | quit program | |<kbd>J</kbd> | <kbd>TAB</kbd> | toggle focus between the panels: list of packets or single packet information |

Support

Please open an issue and we'll try to help.

Roadmap

  • [x] Add code formatting check in CI.
  • [x] Add clippy checks for better and idiomatic Rust code.
  • [ ] Maybe a separate thread for running a timer, to get time of arrival of packets.
  • [ ] Use the insta crate for snapshot testing(or UI testing).
  • [ ] Gracefully handle errors instead of just panicking.
  • [ ] Maybe add a logging functionality for catching errors.

Contributing

Please check out the contribution guide here.

Authors and Acknowledgement

This project is running thanks to all the contributors.

License

Apache License 2.0

View on GitHub
GitHub Stars41
CategoryOperations
Updated1y ago
Forks7

Languages

Rust

Security Score

80/100

Audited on Mar 21, 2025

No findings