mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
new: implementing IsForwardingEnabled for windows firewall
This commit is contained in:
parent
c87e1e7f1d
commit
5887883683
4 changed files with 14 additions and 6 deletions
|
@ -6,9 +6,11 @@ import (
|
|||
"os"
|
||||
|
||||
"github.com/evilsocket/bettercap-ng/core"
|
||||
"github.com/evilsocket/bettercap-ng/net"
|
||||
)
|
||||
|
||||
type LinuxFirewall struct {
|
||||
iface *net.Endpoint
|
||||
forwarding bool
|
||||
redirections map[string]*Redirection
|
||||
}
|
||||
|
@ -17,8 +19,9 @@ const (
|
|||
IPV4ForwardingFile = "/proc/sys/net/ipv4/ip_forward"
|
||||
)
|
||||
|
||||
func Make() FirewallManager {
|
||||
func Make(iface *net.Endpoint) FirewallManager {
|
||||
firewall := &LinuxFirewall{
|
||||
iface: iface,
|
||||
forwarding: false,
|
||||
redirections: make(map[string]*Redirection, 0),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue