mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
progress
This commit is contained in:
parent
756dc3d71a
commit
67cc9680ed
17 changed files with 1833 additions and 274 deletions
|
@ -134,6 +134,8 @@ func (mod *EventsStream) Render(output io.Writer, e session.Event) {
|
|||
mod.viewUpdateEvent(output, e)
|
||||
} else if e.Tag == "gateway.change" {
|
||||
mod.viewGatewayEvent(output, e)
|
||||
} else if e.Tag == "mdns.service" {
|
||||
mod.viewMDNSEvent(output, e)
|
||||
} else if e.Tag != "tick" && e.Tag != "session.started" && e.Tag != "session.stopped" {
|
||||
fmt.Fprintf(output, "[%s] [%s] %v\n", e.Time.Format(mod.timeFormat), tui.Green(e.Tag), e)
|
||||
}
|
||||
|
|
23
modules/events_stream/events_view_mdns.go
Normal file
23
modules/events_stream/events_view_mdns.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package events_stream
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/bettercap/bettercap/v2/modules/mdns"
|
||||
"github.com/bettercap/bettercap/v2/session"
|
||||
"github.com/evilsocket/islazy/tui"
|
||||
)
|
||||
|
||||
func (mod *EventsStream) viewMDNSEvent(output io.Writer, e session.Event) {
|
||||
event := e.Data.(mdns.ServiceDiscoveryEvent)
|
||||
fmt.Fprintf(output, "[%s] [%s] service %s detected for %s (%s):%d : %s\n",
|
||||
e.Time.Format(mod.timeFormat),
|
||||
tui.Green(e.Tag),
|
||||
tui.Bold(event.Service.Name),
|
||||
event.Service.AddrV4.String(),
|
||||
tui.Dim(event.Service.Host),
|
||||
event.Service.Port,
|
||||
event.Service.Info,
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue