rustyping

Crates.iorustyping
lib.rsrustyping
version2.3.1
sourcesrc
created_at2021-06-14 07:36:20.118734
updated_at2022-12-02 04:04:14.838296
descriptionA prettier lightweight colored ping utility written in Rust
homepagehttps://github.com/k4yt3x/rustyping
repositoryhttps://github.com/k4yt3x/rustyping
max_upload_size
id409837
size72,933
K4YT3X (k4yt3x)

documentation

README

rustyping

A prettier lightweight colored ping utility written in Rust.

screenshot

Installation

There are three installation options:

You will need cargo and rustup for the compilation. rustup is required since rustyping requires the nightly channel of the Rust toolchain. Currently, rustyping only support UNIX platforms (Linux and macOS). If you want it to be supported on other platforms, open an issue.

git clone https://github.com/k4yt3x/rustyping.git
cd rustyping
cargo build --release
cargo install --path .
strip $(which rp)

rustyping's binary will be installed to Cargo's binary directory (e.g., ~/.cargo/bin/rp). You can use the command rp to launch rustyping. Note that programs on Linux require the CAP_NET_RAW capability to be able to open raw sockets as an non-root user. The command below gives rustyping's binary this capability.

sudo setcap cap_net_raw=+eip $(which rp)

Unrestricted Mode

By default, non-root users can send pings at a minimal interval of 200ms or 0.2s. This is to prevent normal users from being able to cause ICMP floods. If you wish to disable this safety feature, you can compile rustyping with the unrestricted feature.

cargo build --release --features unrestricted

Usages

You can see the usages using the -h/--help switch.

USAGE:
    rp [OPTIONS] <DESTINATION>

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

OPTIONS:
    -c, --count <COUNT>          stop after <count> replies [default: 0]
    -i, --interval <INTERVAL>    seconds between sending each packet [default: 1.0]
    -W, --timeout <TIMEOUT>      time to wait for response [default: 2.0]

ARGS:
    <DESTINATION>    dns name or ip address
Commit count: 29

cargo fmt