refact: using global wifi objects in order to expose them from the api.rest module

This commit is contained in:
evilsocket 2018-02-17 05:44:25 +01:00
parent 9390a580fd
commit e895dc6ab2
5 changed files with 29 additions and 46 deletions

View file

@ -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)