mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
fix: returning error when neither iw or iwconfig are found
This commit is contained in:
parent
67a0063ee4
commit
c4bbc129b6
1 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,8 @@ func SetInterfaceChannel(iface string, channel int) error {
|
||||||
} else if out != "" {
|
} else if out != "" {
|
||||||
return fmt.Errorf("Unexpected output while setting interface %s to channel %d: %s", iface, channel, out)
|
return fmt.Errorf("Unexpected output while setting interface %s to channel %d: %s", iface, channel, out)
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return fmt.Errorf("no iw or iwconfig binaries found in $PATH")
|
||||||
}
|
}
|
||||||
|
|
||||||
SetInterfaceCurrentChannel(iface, channel)
|
SetInterfaceCurrentChannel(iface, channel)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue