mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 04:59:25 -07:00
fix: better endpoints related events visualization
This commit is contained in:
parent
fb33f491b7
commit
a21420cb7b
1 changed files with 23 additions and 4 deletions
|
@ -22,10 +22,29 @@ func (s EventsStream) viewLogEvent(e session.Event) {
|
||||||
|
|
||||||
func (s EventsStream) viewEndpointEvent(e session.Event) {
|
func (s EventsStream) viewEndpointEvent(e session.Event) {
|
||||||
t := e.Data.(*net.Endpoint)
|
t := e.Data.(*net.Endpoint)
|
||||||
fmt.Printf("[%s] [%s] %s\n",
|
if e.Tag == "endpoint.new" {
|
||||||
e.Time.Format(eventTimeFormat),
|
fmt.Printf("[%s] [%s] Endpoint %s detected as %s\n",
|
||||||
core.Green(e.Tag),
|
e.Time.Format(eventTimeFormat),
|
||||||
t)
|
core.Green(e.Tag),
|
||||||
|
core.Bold(t.IpAddress),
|
||||||
|
t.HwAddress)
|
||||||
|
} else if e.Tag == "endpoint.resolved" {
|
||||||
|
fmt.Printf("[%s] [%s] Endpoint %s resolved as %s\n",
|
||||||
|
e.Time.Format(eventTimeFormat),
|
||||||
|
core.Green(e.Tag),
|
||||||
|
core.Bold(t.IpAddress),
|
||||||
|
core.Yellow(t.Hostname))
|
||||||
|
} else if e.Tag == "endpoint.lost" {
|
||||||
|
fmt.Printf("[%s] [%s] Endpoint %s lost\n",
|
||||||
|
e.Time.Format(eventTimeFormat),
|
||||||
|
core.Green(e.Tag),
|
||||||
|
core.Red(t.IpAddress))
|
||||||
|
} else {
|
||||||
|
fmt.Printf("[%s] [%s] %s\n",
|
||||||
|
e.Time.Format(eventTimeFormat),
|
||||||
|
core.Green(e.Tag),
|
||||||
|
t)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s EventsStream) viewModuleEvent(e session.Event) {
|
func (s EventsStream) viewModuleEvent(e session.Event) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue