mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: fixed compilation of macOS for wifi modules
This commit is contained in:
parent
bf34561a19
commit
79279126e6
3 changed files with 42 additions and 21 deletions
|
@ -37,8 +37,19 @@ func getInterfaceName(iface net.Interface) string {
|
|||
}
|
||||
|
||||
func SetInterfaceChannel(iface string, channel int) error {
|
||||
curr := GetInterfaceChannel(iface)
|
||||
// the interface is already on this channel
|
||||
if curr == channel {
|
||||
return nil
|
||||
}
|
||||
|
||||
_, err := core.Exec(airPortPath, []string{iface, fmt.Sprintf("-c%d", channel)})
|
||||
return err
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
SetInterfaceCurrentChannel(iface, channel)
|
||||
return nil
|
||||
}
|
||||
|
||||
func getFrequenciesFromChannels(output string) ([]int, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue