From 7e3bad9dba7351f832a539251c51785d2598a7d4 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Thu, 22 Feb 2018 17:04:54 +0100 Subject: [PATCH] fix: fixes macOS wifi.* module bug ( ref #61 ) --- network/net_darwin.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/network/net_darwin.go b/network/net_darwin.go index 1b6b42a8..ac60d3e3 100644 --- a/network/net_darwin.go +++ b/network/net_darwin.go @@ -33,13 +33,8 @@ func getInterfaceName(iface net.Interface) string { } func SetInterfaceChannel(iface string, channel int) error { - out, err := core.Exec(airPortPath, []string{iface, "--channel", fmt.Sprintf("%d", channel)}) - if err != nil { - return err - } else if out != "" { - return fmt.Errorf("Unexpected output while setting interface %s to channel %d: %s", iface, channel, out) - } - return nil + _, err := core.Exec(airPortPath, []string{iface, "--channel", fmt.Sprintf("%d", channel)}) + return err } //! TODO Get the list of the available frequencies supported by the network card