Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while :; do
- com=$(sudo arp scan-l | awk -d" " '{ print $1 " " $2 }' 2>/dev/null)
- for line in $com; do
- echo $line
- if [[$line =~ "." ]]; then
- ping -c 3 $line 2>dev/null 1>/dev/null
- if [ "$?" -eq 0 ]; then
- echo $line>>test.txt
- fi
- fi
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement