From e2f4c4c9cf63c9a02f82c39bd6ce86332c5ffc37 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sat, 10 Feb 2018 02:55:41 +0100 Subject: [PATCH] balls --- firewall/firewall_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firewall/firewall_windows.go b/firewall/firewall_windows.go index ad2fe43c..c691f67d 100644 --- a/firewall/firewall_windows.go +++ b/firewall/firewall_windows.go @@ -77,9 +77,9 @@ func (f *WindowsFirewall) AllowPort(port int, address string, proto string, allo cmd := []string{} if allow { - cmd = []string{"advfirewall", "firewall", "add", "rule", nameField, protoField, "dir=in", ipField, portField, "action=allow"} + cmd = []string{"advfirewall", "firewall", "add", "rule", nameField, protoField, "dir=in", portField, "action=allow"} } else { - cmd = []string{"advfirewall", "firewall", "del", "rule", nameField} + cmd = []string{"advfirewall", "firewall", "delete", "rule", nameField, protoField, portField} } out, err := core.Exec("netsh", cmd)