Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/bin/bash
  2. while :; do
  3. com=$(sudo arp scan-l | awk -d" " '{ print $1 " " $2 }' 2>/dev/null)
  4. for line in $com; do
  5.     echo $line
  6.     if [[$line =~ "." ]]; then
  7.         ping -c 3 $line 2>dev/null 1>/dev/null
  8.         if [ "$?" -eq 0 ]; then
  9.             echo $line>>test.txt
  10.         fi
  11.     fi
  12. done
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement