mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
it works!
This commit is contained in:
parent
67cc9680ed
commit
91d360327a
12 changed files with 446 additions and 1356 deletions
|
@ -75,14 +75,14 @@ func (lan *LAN) GetByIp(ip string) *Endpoint {
|
|||
lan.Lock()
|
||||
defer lan.Unlock()
|
||||
|
||||
if ip == lan.iface.IpAddress {
|
||||
if ip == lan.iface.IpAddress || ip == lan.iface.Ip6Address {
|
||||
return lan.iface
|
||||
} else if ip == lan.gateway.IpAddress {
|
||||
} else if ip == lan.gateway.IpAddress || ip == lan.gateway.Ip6Address {
|
||||
return lan.gateway
|
||||
}
|
||||
|
||||
for _, e := range lan.hosts {
|
||||
if e.IpAddress == ip {
|
||||
if e.IpAddress == ip || e.Ip6Address == ip {
|
||||
return e
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue