Last active
September 26, 2022 15:59
-
-
Save fdophin/5dbfa305fc7d3610caadf19a5c5b635f to your computer and use it in GitHub Desktop.
Bash script to Find MAC Address Vendors.
This file contains hidden or 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 | |
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
github mac vendors
Lookup MAC vendors
Get the vendor for a mac address from the terminal
net-mac-vendor
Get the vendor