mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
refact: got rid of go-bindata using a simple py script (fixes #51)
This commit is contained in:
parent
48d27f274a
commit
fd28eadc60
6 changed files with 22980 additions and 273 deletions
18
network/oui.go.template
Normal file
18
network/oui.go.template
Normal file
|
@ -0,0 +1,18 @@
|
|||
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 ""
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue