mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -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"}
|
cmd := []string{"advfirewall"}
|
||||||
|
|
||||||
if allow {
|
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 {
|
} else {
|
||||||
cmd = append(cmd, []string{"del", "rule", nameField})
|
cmd = append(cmd, []string{"del", "rule", nameField}...)
|
||||||
}
|
}
|
||||||
|
|
||||||
out, err := core.Exec("netsh", cmd)
|
out, err := core.Exec("netsh", cmd)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue