Skip to content

Instantly share code, notes, and snippets.

@oxagast
Created October 9, 2016 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oxagast/5285a7e01682dd09e3927c302fc9f865 to your computer and use it in GitHub Desktop.
Save oxagast/5285a7e01682dd09e3927c302fc9f865 to your computer and use it in GitHub Desktop.
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