mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fixed a bug which caused a cidr being parsed as an ip and eventually a panic (fixes #241)
This commit is contained in:
parent
735d074cd8
commit
ae0afc54b5
2 changed files with 2 additions and 2 deletions
|
@ -133,7 +133,7 @@ func buildEndpointFromInterface(iface net.Interface) (*Endpoint, error) {
|
|||
for _, a := range addrs {
|
||||
address := a.String()
|
||||
if IPv4Validator.MatchString(address) {
|
||||
if strings.ContainsRune(address, '/') {
|
||||
if !strings.ContainsRune(address, '/') {
|
||||
// plain ip
|
||||
e.SetIP(address)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue