mirror of
https://github.com/bettercap/bettercap
synced 2025-08-13 02:06:57 -07:00
balls
This commit is contained in:
parent
9353b2038c
commit
cf888b116c
2 changed files with 2 additions and 16 deletions
|
@ -54,28 +54,16 @@ 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 {
|
||||||
rule := []string{
|
rule := []string{
|
||||||
|
"listenaddress=0.0.0.0",
|
||||||
fmt.Sprintf("listenport=%d", r.SrcPort),
|
fmt.Sprintf("listenport=%d", r.SrcPort),
|
||||||
}
|
}
|
||||||
|
|
||||||
if enabled == true {
|
if enabled == true {
|
||||||
rule = append(rule, fmt.Sprintf("protocol=%s", r.Protocol))
|
rule = append(rule, fmt.Sprintf("protocol=%s", r.Protocol))
|
||||||
rule = append(rule, fmt.Sprintf("connectport=%d", r.DstPort))
|
rule = append(rule, fmt.Sprintf("connectport=%d", r.DstPort))
|
||||||
|
rule = append(rule, fmt.Sprintf("connectaddress=%s", r.DstAddress))
|
||||||
if r.SrcAddress != "" {
|
|
||||||
rule = append(rule, fmt.Sprintf("connectaddress=%s", r.SrcAddress))
|
|
||||||
} else {
|
|
||||||
rule = append(rule, fmt.Sprintf("connectaddress=%s", r.DstAddress))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if r.DstAddress != "" {
|
|
||||||
rule = append(rule, fmt.Sprintf("listenaddress=%s", r.DstAddress))
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
rule = append(rule, "listenaddress=0.0.0.0")
|
|
||||||
|
|
||||||
return rule
|
return rule
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package modules
|
package modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"github.com/evilsocket/bettercap-ng/session"
|
"github.com/evilsocket/bettercap-ng/session"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -37,7 +36,6 @@ func NewHttpProxy(s *session.Session) *HttpProxy {
|
||||||
p.AddHandler(session.NewModuleHandler("http.proxy on", "",
|
p.AddHandler(session.NewModuleHandler("http.proxy on", "",
|
||||||
"Start HTTP proxy.",
|
"Start HTTP proxy.",
|
||||||
func(args []string) error {
|
func(args []string) error {
|
||||||
fmt.Printf("\nproxy.start\n")
|
|
||||||
return p.Start()
|
return p.Start()
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue