mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
fix: Add missing NormalizeMac call while arp_spoof getMac. (ref #10)
This commit is contained in:
parent
3ce75555da
commit
4679521d9a
3 changed files with 4 additions and 3 deletions
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue