Skip to content

Instantly share code, notes, and snippets.

@pastranastevenaz
Created October 15, 2019 03:57
Show Gist options
  • Select an option

  • Save pastranastevenaz/86291e9c61e52e48dde78f4756200a0b to your computer and use it in GitHub Desktop.

Select an option

Save pastranastevenaz/86291e9c61e52e48dde78f4756200a0b to your computer and use it in GitHub Desktop.
MAC address OUI lookup linux
#!/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