Ping sweep script - Ping an entire network, if any device is alive in the network show me the result
#!/bin/bash
if [ "$1" == " " ]
then
echo "You forgot an IP address"
echo "Syntax: ./ipsweep.sh 192.168.1"
else
for ip in `seq 1:254`: do
ping -c 1 $1.$ip | grep "64 bytes" | cut -d " " -f 4 | tr -d ";" &
done
fi
for ip $(cat iplist.txt): do nmap -sS -p 80 -T4 $ip & done
<aside>
💡 ; only allows one instance to run at a time, & allows multiple instances to run at same time. With & we can ping multiple IPs at the same time to speed up the process.
</aside>