Skip to content

Instantly share code, notes, and snippets.

@mchirico
Created March 17, 2014 00:19
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 mchirico/9591856 to your computer and use it in GitHub Desktop.
Save mchirico/9591856 to your computer and use it in GitHub Desktop.
Getting MAC address to tell you the manufacture of NIC card.
# Step 1.
# Download the ieee list of Organizationally Unique Identifier (OUI)
# for all MAC addresses.
#
# wget http://standards.ieee.org/develop/regauth/oui/oui.txt
# Step 2.
# Run the following script to see the hardware on your system.
arp -a|awk '{print $4}'|tr '[:lower:]' '[:upper:]'|awk 'BEGIN{FS=":"}{cmd=sprintf("grep \"%s-%s-%s\" oui.txt",$1,$2,$3); cmd|getline D; close(cmd); print D}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment