Created
October 9, 2016 15:47
-
-
Save oxagast/5285a7e01682dd09e3927c302fc9f865 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
rm page_part 2>/dev/null; | |
arp | sed -e 's/.*ether[[:space:]]*//' -e 's/ C.*//' | grep : | xargs -I {XXX} curl -s https://www.adminsub.net/mac-address-finder/{XXX} | grep Vendor -A 1 | grep google > page_part; | |
cat page_part | cut -d '=' -f 5 | cut -d '"' -f 1 > macs_resolved && arp -n | arp -n | cut -f 1 -d ' ' > ips_tomac; | |
tail -n $(echo `cat ips_tomac | wc -l`-1 | bc) ips_tomac > ips_tomac2; | |
cat ips_tomac2 -n | tee resolved && cat macs_resolved -n | tee -a resolved; | |
rm ips_tomac ips_tomac2 macs_resolved page_part |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment