mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
refact: using global wifi objects in order to expose them from the api.rest module
This commit is contained in:
parent
9390a580fd
commit
e895dc6ab2
5 changed files with 29 additions and 46 deletions
|
@ -39,6 +39,7 @@ type Session struct {
|
|||
Firewall firewall.FirewallManager `json:"-"`
|
||||
Env *Environment `json:"env"`
|
||||
Targets *Targets `json:"targets"`
|
||||
WiFi *network.WiFi `json:"wifi"`
|
||||
Queue *packets.Queue `json:"packets"`
|
||||
Input *readline.Instance `json:"-"`
|
||||
StartedAt time.Time `json:"started_at"`
|
||||
|
@ -375,6 +376,7 @@ func (s *Session) Start() error {
|
|||
s.Gateway = s.Interface
|
||||
}
|
||||
|
||||
s.WiFi = network.NewWiFi(s.Interface)
|
||||
s.Targets = NewTargets(s, s.Interface, s.Gateway)
|
||||
s.Firewall = firewall.Make(s.Interface)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue