mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
e895dc6ab2
commit
eb5a72a44c
9 changed files with 234 additions and 220 deletions
|
@ -154,7 +154,7 @@ func (s *DHCP6Spoofer) dhcpAdvertise(pkt gopacket.Packet, solicit dhcp6.Packet,
|
|||
}
|
||||
|
||||
var ip net.IP
|
||||
if t, found := s.Session.Targets.Targets[target.String()]; found == true {
|
||||
if t, found := s.Session.Lan.Hosts[target.String()]; found == true {
|
||||
ip = t.IP
|
||||
} else {
|
||||
log.Warning("Address %s not known, using random identity association address.", target.String())
|
||||
|
@ -312,7 +312,7 @@ func (s *DHCP6Spoofer) dhcpReply(toType string, pkt gopacket.Packet, req dhcp6.P
|
|||
addr = net.IP(raw[0])
|
||||
}
|
||||
|
||||
if t, found := s.Session.Targets.Targets[target.String()]; found == true {
|
||||
if t, found := s.Session.Lan.Hosts[target.String()]; found == true {
|
||||
log.Info("[%s] IPv6 address %s is now assigned to %s", core.Green("dhcp6"), addr.String(), t)
|
||||
} else {
|
||||
log.Info("[%s] IPv6 address %s is now assigned to %s", core.Green("dhcp6"), addr.String(), target)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue