diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-01-02 08:41:05 +0100 |
---|---|---|
committer | Aram Drevekenin <aram@poor.dev> | 2020-01-02 08:41:05 +0100 |
commit | 0975a0bf6f0271cffb5a1fafdbff595990534f24 (patch) | |
tree | 76313a74c295716892db7c8bbdc3337c8b171a1b /README.md | |
parent | 43618d32aaf8058f46db7c2cac8cc771e3368ce1 (diff) |
docs(readme): mention `setcap` to set the binary capability on `bandwhich` (#57)
See #30.
This also boldens the part that mentions root privileges are required
to make it easier to notice.
Co-authored-by: Aram Drevekenin <aram@poor.dev>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -49,7 +49,13 @@ OPTIONS: -i, --interface <interface> The network interface to listen on, eg. eth0 ``` -Note that since `bandwhich` sniffs network packets, it requires root privileges - so you might want to use it with (for example) `sudo`. +**Note that since `bandwhich` sniffs network packets, it requires root privileges** - so you might want to use it with (for example) `sudo`. + +On Linux, you can give the `bandwhich` binary a permanent capability to use the required privileges, so that you don't need to use `sudo bandwhich` anymore: + +```bash +sudo setcap cap_net_raw,cap_net_admin=+ep "$HOME/.cargo/bin/bandwhich" +``` ### raw_mode `bandwhich` also supports an easier-to-parse mode that can be piped or redirected to a file. For example, try: @@ -62,7 +68,7 @@ Contributions of any kind are very welcome. If you'd like a new feature (or foun To set up your development environment: 1. Clone the project 2. `cargo run`, or if you prefer `cargo run -- -i <network interface name>` (you can often find out the name with `ifconfig` or `iwconfig`). You might need root privileges to run this application, so be sure to use (for example) sudo. - + To run tests: `cargo test` Note that at the moment the tests do not test the os layer (anything in the `os` folder). |