diff --git a/modules/arp_spoof.go b/modules/arp_spoof.go index 88ce2ce5..1c5b6cb7 100644 --- a/modules/arp_spoof.go +++ b/modules/arp_spoof.go @@ -93,6 +93,7 @@ func (p *ArpSpoofer) getMAC(ip net.IP, probe bool) (net.HardwareAddr, error) { return nil, fmt.Errorf("Could not find hardware address for %s.", ip.String()) } + mac = network.NormalizeMac(mac) hw, err = net.ParseMAC(mac) if err != nil { return nil, fmt.Errorf("Error while parsing hardware address '%s' for %s: %s", mac, ip.String(), err) diff --git a/net/endpoint.go b/net/endpoint.go index 75a6901f..f2a7c776 100644 --- a/net/endpoint.go +++ b/net/endpoint.go @@ -35,7 +35,7 @@ func ip2int(ip net.IP) uint32 { return binary.BigEndian.Uint32(ip) } -func normalizeMac(mac string) string { +func NormalizeMac(mac string) string { parts := strings.Split(mac, ":") for i, p := range parts { if len(p) < 2 { @@ -47,7 +47,7 @@ func normalizeMac(mac string) string { func NewEndpointNoResolve(ip, mac, name string, bits uint32) *Endpoint { addr := net.ParseIP(ip) - mac = normalizeMac(mac) + mac = NormalizeMac(mac) hw, _ := net.ParseMAC(mac) now := time.Now() diff --git a/net/oui_compiled.go b/net/oui_compiled.go index 5f4beb1c..f151b0a2 100644 --- a/net/oui_compiled.go +++ b/net/oui_compiled.go @@ -83,7 +83,7 @@ func netOuiDat() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "net/oui.dat", size: 585353, mode: os.FileMode(420), modTime: time.Unix(1515886539, 0)} + info := bindataFileInfo{name: "net/oui.dat", size: 585353, mode: os.FileMode(420), modTime: time.Unix(1516884015, 0)} a := &asset{bytes: bytes, info: info} return a, nil }