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,27 +54,15 @@ func (f WindowsFirewall) EnableForwarding(enabled bool) error {
|
|||
|
||||
func (f WindowsFirewall) generateRule(r *Redirection, enabled bool) []string {
|
||||
rule := []string{
|
||||
"listenaddress=0.0.0.0",
|
||||
fmt.Sprintf("listenport=%d", r.SrcPort),
|
||||
}
|
||||
|
||||
if enabled == true {
|
||||
rule = append(rule, fmt.Sprintf("protocol=%s", r.Protocol))
|
||||
rule = append(rule, fmt.Sprintf("connectport=%d", r.DstPort))
|
||||
|
||||
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
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package modules
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/evilsocket/bettercap-ng/session"
|
||||
)
|
||||
|
||||
|
@ -37,7 +36,6 @@ func NewHttpProxy(s *session.Session) *HttpProxy {
|
|||
p.AddHandler(session.NewModuleHandler("http.proxy on", "",
|
||||
"Start HTTP proxy.",
|
||||
func(args []string) error {
|
||||
fmt.Printf("\nproxy.start\n")
|
||||
return p.Start()
|
||||
}))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue