Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pesos/rshark
Simple Packet Monitoring Tool
https://github.com/pesos/rshark
cli networking packet-monitoring packets rust
Last synced: 21 days ago
JSON representation
Simple Packet Monitoring Tool
- Host: GitHub
- URL: https://github.com/pesos/rshark
- Owner: pesos
- License: apache-2.0
- Created: 2020-07-26T17:30:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-26T06:57:15.000Z (over 3 years ago)
- Last Synced: 2024-08-21T21:27:16.480Z (4 months ago)
- Topics: cli, networking, packet-monitoring, packets, rust
- Language: Rust
- Homepage:
- Size: 279 KB
- Stars: 40
- Watchers: 2
- Forks: 8
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Rshark
![CI](https://github.com/pmk21/rshark/workflows/CI/badge.svg)
A terminal UI based packet monitoring tool written in Rust.
![Example UI](images/example.png)
## 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
```output
USAGE:
rshark [OPTIONS]FLAGS:
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
-i, --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`
2. Run the binary on a device, e.g. WiFi, must run as root.
`sudo cargo run -- -i en0`### Keyboard bindings
| key | alternate | description |
|-----|-----------|-------------|
|k | ↑ | move cursor up |
|j | ↓ | move cursor down |
|g | | move cursor at begin |
|G | | move cursor at end |
|ESC | ← | reset cursor position |
|q | CTRL+C | quit program |
|J | TAB | 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](CONTRIBUTING.md).
## Authors and Acknowledgement
This project is running thanks to all the contributors.
## License
Apache License 2.0