mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 10:46:57 -07:00
balls
This commit is contained in:
parent
7d4c7cca4f
commit
c8153fd0f9
1 changed files with 3 additions and 2 deletions
|
@ -91,12 +91,13 @@ func (f *WindowsFirewall) AllowPort(port int, address string, proto string, allo
|
|||
return fmt.Errorf("Unexpected netsh output: %s", out)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *WindowsFirewall) EnableRedirection(r *Redirection, enabled bool) error {
|
||||
if err := f.AllowPort(r.SrcPort, r.DstAddress, enabled); err != nil {
|
||||
if err := f.AllowPort(r.SrcPort, r.DstAddress, r.Protocol, enabled); err != nil {
|
||||
return err
|
||||
} else if err := f.AllowPort(r.DstPort, r.DstAddress, enabled); err != nil {
|
||||
} else if err := f.AllowPort(r.DstPort, r.DstAddress, r.Protocol, enabled); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue