mirror of
https://github.com/bettercap/bettercap
synced 2025-07-06 21:12:05 -07:00
balls
This commit is contained in:
parent
8fbf32aacd
commit
9ed70d6d90
1 changed files with 16 additions and 8 deletions
|
@ -53,6 +53,13 @@ func (f WindowsFirewall) EnableForwarding(enabled bool) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f WindowsFirewall) generateRule(r *Redirection, enabled bool) []string {
|
func (f WindowsFirewall) generateRule(r *Redirection, enabled bool) []string {
|
||||||
|
return []string{
|
||||||
|
fmt.Sprintf("listenport=%d", r.SrcPort),
|
||||||
|
fmt.Sprintf("connectport=%d", r.DstPort),
|
||||||
|
fmt.Sprintf("connectaddress=%s", r.DstAddress),
|
||||||
|
fmt.Sprintf("protocol=%s", r.Protocol),
|
||||||
|
}
|
||||||
|
/*
|
||||||
rule := []string{
|
rule := []string{
|
||||||
"listenaddress=0.0.0.0",
|
"listenaddress=0.0.0.0",
|
||||||
fmt.Sprintf("listenport=%d", r.SrcPort),
|
fmt.Sprintf("listenport=%d", r.SrcPort),
|
||||||
|
@ -65,6 +72,7 @@ func (f WindowsFirewall) generateRule(r *Redirection, enabled bool) []string {
|
||||||
}
|
}
|
||||||
|
|
||||||
return rule
|
return rule
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *WindowsFirewall) AllowPort(port int, address string, proto string, allow bool) error {
|
func (f *WindowsFirewall) AllowPort(port int, address string, proto string, allow bool) error {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue