mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
2966153adf
commit
26c532316a
21 changed files with 355 additions and 75 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/evilsocket/islazy/ops"
|
||||
"github.com/evilsocket/islazy/str"
|
||||
"github.com/evilsocket/islazy/tui"
|
||||
)
|
||||
|
@ -20,7 +21,10 @@ func (mod *ZeroGod) show(filter string, withData bool) error {
|
|||
|
||||
for _, entry := range entries {
|
||||
if endpoint := mod.Session.Lan.GetByIp(entry.Address); endpoint != nil {
|
||||
fmt.Fprintf(mod.Session.Events.Stdout, "* %s (%s)\n", tui.Bold(endpoint.IpAddress), tui.Dim(endpoint.Vendor))
|
||||
fmt.Fprintf(mod.Session.Events.Stdout, "* %s (%s)%s\n",
|
||||
tui.Bold(endpoint.IpAddress),
|
||||
tui.Dim(endpoint.Vendor),
|
||||
ops.Ternary(endpoint.Hostname == "", "", " "+tui.Bold(endpoint.Hostname)))
|
||||
} else {
|
||||
fmt.Fprintf(mod.Session.Events.Stdout, "* %s\n", tui.Bold(entry.Address))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue