mirror of
https://github.com/bettercap/bettercap.git
synced 2025-03-12 04:36:03 -07:00
fix: printing vendor for new endpoint events
This commit is contained in:
parent
e53876f120
commit
9f34d4442d
@ -22,18 +22,16 @@ func (s EventsStream) viewLogEvent(e session.Event) {
|
||||
func (s EventsStream) viewEndpointEvent(e session.Event) {
|
||||
t := e.Data.(*net.Endpoint)
|
||||
if e.Tag == "endpoint.new" {
|
||||
extra := ""
|
||||
if t.Hostname != "" {
|
||||
extra = fmt.Sprintf(" (%s)", core.Yellow(t.Hostname))
|
||||
} else if t.Alias != "" {
|
||||
extra = fmt.Sprintf(" (%s)", core.Green(t.Alias))
|
||||
vend := ""
|
||||
if t.Vendor != "" {
|
||||
vend = fmt.Sprintf(" (%s)", t.Vendor)
|
||||
}
|
||||
|
||||
fmt.Printf("[%s] Endpoint %s detected as %s%s.\n",
|
||||
e.Time.Format(eventTimeFormat),
|
||||
t.HwAddress,
|
||||
core.Bold(t.IpAddress),
|
||||
extra)
|
||||
core.Green(t.HwAddress),
|
||||
vend)
|
||||
} else if e.Tag == "endpoint.lost" {
|
||||
fmt.Printf("[%s] Endpoint %s lost.\n",
|
||||
e.Time.Format(eventTimeFormat),
|
||||
@ -47,12 +45,10 @@ func (s EventsStream) viewEndpointEvent(e session.Event) {
|
||||
}
|
||||
|
||||
func (s EventsStream) viewModuleEvent(e session.Event) {
|
||||
// if *session.I.Options.Debug == true {
|
||||
fmt.Printf("[%s] [%s] %s\n",
|
||||
e.Time.Format(eventTimeFormat),
|
||||
core.Green(e.Tag),
|
||||
e.Data)
|
||||
// }
|
||||
}
|
||||
|
||||
func (s EventsStream) viewSnifferEvent(e session.Event) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user