Created
October 15, 2019 03:57
-
-
Save pastranastevenaz/86291e9c61e52e48dde78f4756200a0b to your computer and use it in GitHub Desktop.
MAC address OUI lookup linux
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 | |
| OUI=$(ip addr list|grep -w 'link'|awk '{print $2}'|grep -P '^(?!00:00:00)'| grep -P '^(?!fe80)' | tr -d ':' | head -c 6) | |
| curl -sS "http://standards-oui.ieee.org/oui.txt" | grep -i "$OUI" | cut -d')' -f2 | tr -d '\t' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment