14 releases

0.4.2 Sep 16, 2024
0.4.1 Jun 5, 2023
0.3.5 Apr 26, 2023
0.3.4 Sep 19, 2022
0.1.2 Jul 24, 2021

#524 in Network programming

Download history 150/week @ 2024-09-11 54/week @ 2024-09-18 30/week @ 2024-09-25 4/week @ 2024-10-02

491 downloads per month

GPL-3.0-or-later

20KB
199 lines

pingall

Utility to quickly and efficiently discover available ip addresses and their hostnames on your network. This program will always finish within 2 seconds, much faster than nmap 196.168.1.*.

  • Quickly find all ip addresses and hostnames on your network.
  • Populate DNS/mDNS tables automatically.

Usage

USAGE:
    pingall [FLAGS] [OPTIONS]

FLAGS:
    -d, --dont-resolve    Don't attempt to resolve hostnames
    -h, --help            Prints help information
    -r, --raw-socket      Open raw socket instead of using system `ping` command. Requires permissions
    -V, --version         Prints version information

OPTIONS:
    -i, --interface <interface>    Interface to search

Ping all available ip addresses:

$ pingall
192.168.0.1        router.local
192.168.0.19       SAMSUNG-GALAXY-8
192.168.0.98       raspberrypi.local
10.10.0.132
10.10.0.152        vps.local
10.10.0.243

Ping only Wi-Fi addresses on wlan0, don't resolve hostnames:

pingall -i wlan0 --dont-resolve
192.168.0.1
192.168.0.19
192.168.0.98

Installation

cargo install pingall

Details

Simultaneously ping all of the addresses on your subnets with a 1 second timeout, so we can gauge who is responsive on the network. tokio is used to make it all asynchronous (only 1 thread is used).

Raw Ping

The system ping command is used by default, as opening raw sockets in unix requires root permissions. To avoid using the ping command, you can use the --raw-socket flag, but this will require either sudo, or running

setcap cap_net_raw+ep $(which pingall)

to give this program permission.

Dependencies

Dependencies

~5–13MB
~148K SLoC