mirror of
https://github.com/bettercap/bettercap
synced 2025-07-05 20:42:09 -07:00
21 lines
No EOL
340 B
Text
21 lines
No EOL
340 B
Text
package network
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
var manuf = #MAP#
|
|
|
|
func ManufLookup(mac string) string {
|
|
macHex := strings.ToUpper(strings.Replace(mac, ":", "", -1))
|
|
macLen := len(macHex)
|
|
|
|
for offset := macLen; offset >= 2; offset -= 2 {
|
|
part := macHex[0:offset]
|
|
if vendor, found := manuf[part]; found {
|
|
return vendor
|
|
}
|
|
}
|
|
|
|
return ""
|
|
} |