fix: Add missing NormalizeMac call while arp_spoof getMac. (ref #10)

This commit is contained in:
onura 2018-01-25 15:51:21 +03:00
commit 4679521d9a
3 changed files with 4 additions and 3 deletions

View file

@ -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()

View file

@ -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
}