Created
November 19, 2018 09:33
-
-
Save RichardBronosky/48cf4ce961124042f849d4a15d8961e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
sudo nmap -sP -n $( | |
ip address show $(ip route get 8.8.8.8 | \ | |
awk '$1=="none"{$5=$6} /8.8.8.8/{print $5; exit}' | |
) | \ | |
awk '$1=="inet"{print $2}') | \ | |
awk '/report for/{ip=$5} /MAC Address/{if($3 ~ "B8:27:EB")print(ip, $3)}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment