Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ "$1" == "" ]
- then
- echo "Usage: ./pingsweep.sh [network]"
- echo "Exmaple: ./pingsweep.sh 192.168.1"
- else
- for ip in `seq 1 254`; do
- ping -c 1 $1.$ip | grep "64 bytes" | cut -d ' ' -f 4 | sed 's/.$//' &
- done
- fi
- #!/bin/bash
- if [ "$1" == "" ]
- then
- echo "Usage: ./pingsweep.sh [ip list txt]"
- echo "Exmaple: ./pingsweep.sh list.txt"
- else
- for ip in `cat $1`; do
- ping -c 1 $ip | grep "64 bytes" | cut -d ' ' -f 4 | sed 's/.$//' &
- done
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement