Source: "Advanced Penetration Testing" Cybrary I. # Pings the C class network and prints only live hosts #!/bin/bash if [ “$1” == “”] then echo “Usage: ./pingscript.sh [network]” echo “example: ./pingscript.sh 192.168.20” else for x in `seq 1 254`; do ping -c 1 $1.$x | grep “64 bytes” | cut -d” “ -f4 | sed ‘s/.$//’ done fi II. $: chmod +x [name of the bash script]
0 Comments
Leave a Reply. |
AuthorVitali Kremez Archives
July 2016
Categories |