mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: propagating mod.started and mod.stopped events
This commit is contained in:
parent
0f427911be
commit
c89123f305
2 changed files with 10 additions and 10 deletions
|
@ -66,10 +66,12 @@ func (mod *EventsStream) viewEndpointEvent(e session.Event) {
|
|||
}
|
||||
|
||||
func (mod *EventsStream) viewModuleEvent(e session.Event) {
|
||||
fmt.Fprintf(mod.output, "[%s] [%s] %s\n",
|
||||
e.Time.Format(mod.timeFormat),
|
||||
tui.Green(e.Tag),
|
||||
e.Data)
|
||||
if *mod.Session.Options.Debug {
|
||||
fmt.Fprintf(mod.output, "[%s] [%s] %s\n",
|
||||
e.Time.Format(mod.timeFormat),
|
||||
tui.Green(e.Tag),
|
||||
e.Data)
|
||||
}
|
||||
}
|
||||
|
||||
func (mod *EventsStream) viewSnifferEvent(e session.Event) {
|
||||
|
|
|
@ -186,12 +186,10 @@ func (m *SessionModule) SetRunning(running bool, cb func()) error {
|
|||
m.Started = running
|
||||
m.StatusLock.Unlock()
|
||||
|
||||
if *m.Session.Options.Debug {
|
||||
if running {
|
||||
m.Session.Events.Add("mod.started", m.Name)
|
||||
} else {
|
||||
m.Session.Events.Add("mod.stopped", m.Name)
|
||||
}
|
||||
if running {
|
||||
m.Session.Events.Add("mod.started", m.Name)
|
||||
} else {
|
||||
m.Session.Events.Add("mod.stopped", m.Name)
|
||||
}
|
||||
|
||||
if cb != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue