Kali Ping Scripting and NMAP - JimKnee-Champ/Ethical-Hacking-Journal GitHub Wiki
Script to perform looped pings of IP range and output successful pings to file (all typed directly onto command line): """for i in $(seq 2 50) ping 10.0.5.$i | grep "64" | cut -d " " -f 4 >> sweep.txt """
Same with Fping: """for i in $(seq 2 50) fping 10.0.5.$i | grep "alive" | cut -d " " -f 1 >> sweep2.txt """
NMAP scan of ranges with open addresses outputted to file:
"""for i in $(seq 2 50)
sudo nmap -sn --open 10.0.5.$i | grep 10.0.5 | cut -d " " -f 5 >> sweep3.txt
"""
Important notes: NMAP uses icmp and tcp to probe ports, and behaves differently when run as a super user.