A ping sweep is a basic network scanning technique used to determine which of a range of IP addresses map to live hosts. (Techtarget)
This script executes the ping command with a count equal to one and grabs the value of the package received. If the value is zero, the host is down, now if the value is one, the host is up.
- NOTE: There is no error handling, this script only verifies if the file exists (-f) or if it has read permission (-r).
# Clone
$ git clone <https://github.com/hihackthis/pingUpDown.git>
# Access the directory
$ cd pingUpDow
# Give privileges
$ chmod +x pingUpDown.sh
# Run script
$ ./pingUpDown.sh /PATH/FILE
File examples:
1.1.1.1
2.2.2.2
3.3.3.3
4.4.4.4
5.5.5.5
site1.com
site2.com.br
site3.net
site4.gov
1.1.1.1
2.2.2.2
3.3.3.3
4.4.4.4
site1.com
site2.com.br
Have fun! 🤑
Heartfelt thanks 😎