Skip to content

Instantly share code, notes, and snippets.

@fdophin
Last active September 26, 2022 15:59
Show Gist options
  • Save fdophin/5dbfa305fc7d3610caadf19a5c5b635f to your computer and use it in GitHub Desktop.
Save fdophin/5dbfa305fc7d3610caadf19a5c5b635f to your computer and use it in GitHub Desktop.
Bash script to Find MAC Address Vendors.
#!/bin/bash
color=`seq 2 255 | sort -R | head -n 1`
if [ $# != 1 ];
then
echo -e " usage: $0 <MAC addres> \n format: \n 00-11-22-33-44-55 \n 00-11-22-33-44-55 \n 00:11:22:33:44:55 \n 00.11.22.33.44.55 \n 001122334455 \n 0011.2233.4455"
exit 0
fi
GET_VDR=`curl -s http://api.macvendors.com/$1`
if [[ "$GET_VDR" =~ [0-9A-Z] ]];
then
echo -e "\n\t\e[01;04;38;5;${color};48;05;232m${GET_VDR}\e[0m\n"
else
echo -e "\n\tVendor Not Found\n"
fi
@fdophin
Copy link
Author

fdophin commented Oct 8, 2016

github mac vendors
Lookup MAC vendors
Get the vendor for a mac address from the terminal
net-mac-vendor
Get the vendor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment