mirror of
https://github.com/bettercap/bettercap
synced 2025-07-07 13:32:07 -07:00
new: gateway.change event for MITM monitoring
This commit is contained in:
parent
43a93fd866
commit
c47e3f6195
8 changed files with 144 additions and 5 deletions
|
@ -255,8 +255,12 @@ func (s *Session) Start() error {
|
|||
s.Events.Log(level, "%s", err.Error())
|
||||
}
|
||||
|
||||
// we are the gateway
|
||||
if s.Gateway == nil || s.Gateway.IpAddress == s.Interface.IpAddress {
|
||||
s.Gateway = s.Interface
|
||||
} else {
|
||||
// start monitoring for gateway changes
|
||||
go s.routeMon()
|
||||
}
|
||||
|
||||
s.Firewall = firewall.Make(s.Interface)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue