new: new limit optional argument for events.show

This commit is contained in:
evilsocket 2018-02-08 12:03:40 +01:00
commit 3c2932514a
4 changed files with 37 additions and 24 deletions

View file

@ -127,9 +127,11 @@ func (m *SessionModule) SetRunning(running bool) {
defer m.StatusLock.Unlock()
m.Started = running
if running {
m.Session.Events.Add("mod.started", m.Name)
} else {
m.Session.Events.Add("mod.stopped", m.Name)
if *m.Session.Options.Debug == true {
if running {
m.Session.Events.Add("mod.started", m.Name)
} else {
m.Session.Events.Add("mod.stopped", m.Name)
}
}
}

View file

@ -185,9 +185,11 @@ func (tp *Targets) AddIfNew(ip, mac string) *bnet.Endpoint {
}
e := bnet.NewEndpoint(ip, mac)
e.ResolvedCallback = func(e *bnet.Endpoint) {
tp.Session.Events.Add("endpoint.resolved", e)
}
/*
e.ResolvedCallback = func(e *bnet.Endpoint) {
tp.Session.Events.Add("endpoint.resolved", e)
}
*/
if alias, found := tp.Aliases[mac]; found {
e.Alias = alias