mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
balls
This commit is contained in:
parent
d8512f23a8
commit
7d4c7cca4f
1 changed files with 2 additions and 2 deletions
|
@ -77,9 +77,9 @@ func (f *WindowsFirewall) AllowPort(port int, address string, proto string, allo
|
|||
cmd := []string{"advfirewall"}
|
||||
|
||||
if allow {
|
||||
cmd = append(cmd, []string{"add", "rule", nameField, protoField, "dir=in", ipField, portField, "action=allow"})
|
||||
cmd = append(cmd, []string{"add", "rule", nameField, protoField, "dir=in", ipField, portField, "action=allow"}...)
|
||||
} else {
|
||||
cmd = append(cmd, []string{"del", "rule", nameField})
|
||||
cmd = append(cmd, []string{"del", "rule", nameField}...)
|
||||
}
|
||||
|
||||
out, err := core.Exec("netsh", cmd)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue