mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 04:52:10 -07:00
fix: revert back to parsing IPv4 address blocks in net.FindInterface
This commit is contained in:
parent
e255eba69f
commit
aba29e03f6
1 changed files with 1 additions and 1 deletions
|
@ -264,7 +264,7 @@ func FindInterface(name string) (*Endpoint, error) {
|
||||||
|
|
||||||
for _, address := range addrs {
|
for _, address := range addrs {
|
||||||
ip := address.String()
|
ip := address.String()
|
||||||
if ip != "127.0.0.1" && IPv4Validator.MatchString(ip) {
|
if !strings.HasPrefix(ip, "127.0.0.1") && IPv4BlockValidator.MatchString(ip) {
|
||||||
return buildEndpointFromInterface(iface)
|
return buildEndpointFromInterface(iface)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue