bettercap/network/oui.go.template

18 lines
289 B
Text

package network
import (
"strings"
)
var oui = #MAP#
func OuiLookup(mac string) string {
octects := strings.Split(mac, ":")
if len(octects) > 3 {
prefix := octects[0] + octects[1] + octects[2]
if vendor, found := oui[prefix]; found == true {
return vendor
}
}
return ""
}