mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
new: dhcp6 spoofer step 1: get solicit packets and send spoofed advertisements.
This commit is contained in:
parent
c2e845d9d4
commit
da57450315
8 changed files with 317 additions and 3 deletions
|
@ -11,8 +11,10 @@ import (
|
|||
type OnHostResolvedCallback func(e *Endpoint)
|
||||
type Endpoint struct {
|
||||
IP net.IP `json:"-"`
|
||||
IPv6 net.IP `json:"."`
|
||||
HW net.HardwareAddr `json:"-"`
|
||||
IpAddress string `json:"address"`
|
||||
IpAddress string `json:"ipv4"`
|
||||
Ip6Address string `json:"ipv6"`
|
||||
SubnetBits uint32 `json:"-"`
|
||||
IpAddressUint32 uint32 `json:"-"`
|
||||
HwAddress string `json:"mac"`
|
||||
|
|
|
@ -43,6 +43,12 @@ func FindInterface(name string) (*Endpoint, error) {
|
|||
e = NewEndpointNoResolve(ip_part, mac, iface.Name, uint32(bits))
|
||||
}
|
||||
}
|
||||
} else if e != nil {
|
||||
parts := strings.SplitN(ip, "/", 2)
|
||||
e.IPv6 = net.ParseIP(parts[0])
|
||||
if e.IPv6 != nil {
|
||||
e.Ip6Address = e.IPv6.String()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue