mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 21:43:18 -07:00
new: showing last events in net.show instead of useless histogram
This commit is contained in:
parent
3d7c19b071
commit
eb1a53efa3
4 changed files with 50 additions and 21 deletions
|
@ -28,7 +28,7 @@ func (s EventsStream) viewSnifferEvent(e session.Event) {
|
|||
se.Data)
|
||||
}
|
||||
|
||||
func (s *EventsStream) view(e session.Event) {
|
||||
func (s *EventsStream) View(e session.Event, refresh bool) {
|
||||
if s.filter == "" || strings.Contains(e.Tag, s.filter) {
|
||||
if e.Tag == "sys.log" {
|
||||
s.viewLogEvent(e)
|
||||
|
@ -38,6 +38,8 @@ func (s *EventsStream) view(e session.Event) {
|
|||
fmt.Printf("[%s] [%s] %v\n", e.Time.Format(eventTimeFormat), core.Green(e.Tag), e)
|
||||
}
|
||||
|
||||
s.Session.Refresh()
|
||||
if refresh {
|
||||
s.Session.Refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue