From 296fbbf74be40dbbe8b7d9c4e8c40f91341b4ea4 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Thu, 8 Feb 2018 02:14:01 +0100 Subject: [PATCH] new: this should complete windows firewall support? --- firewall/firewall_windows.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/firewall/firewall_windows.go b/firewall/firewall_windows.go index 142b2279..08f5a193 100644 --- a/firewall/firewall_windows.go +++ b/firewall/firewall_windows.go @@ -84,13 +84,14 @@ func (f *WindowsFirewall) EnableRedirection(r *Redirection, enabled bool) error rule = append([]string{"interface", "portproxy", "delete", "v4tov4"}, rule...) } - fmt.Printf("%v\n", rule) out, err := core.Exec("netsh", rule) if err != nil { return err } - fmt.Printf("enableredir=%s\n", out) + if core.Trim(out) != "" { + return fmt.Errorf("Unexpected netsh output: %s", out) + } return nil }