mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
new: new alias command
This commit is contained in:
parent
da185c7785
commit
a2cc2746b4
3 changed files with 36 additions and 2 deletions
|
@ -107,10 +107,15 @@ func (d *Discovery) Show(by string) error {
|
|||
seen = core.Dim(seen)
|
||||
}
|
||||
|
||||
name := core.Yellow(t.Hostname)
|
||||
if t.Alias != "" {
|
||||
name = core.Green(t.Alias)
|
||||
}
|
||||
|
||||
data[i] = []string{
|
||||
t.IpAddress,
|
||||
t.HwAddress,
|
||||
core.Yellow(t.Hostname),
|
||||
name,
|
||||
t.Vendor,
|
||||
humanize.Bytes(traffic.Sent),
|
||||
humanize.Bytes(traffic.Received),
|
||||
|
@ -120,7 +125,7 @@ func (d *Discovery) Show(by string) error {
|
|||
|
||||
table = tablewriter.NewWriter(os.Stdout)
|
||||
|
||||
table.SetHeader([]string{"IP", "MAC", "Hostname", "Vendor", "Sent", "Recvd", "Last Seen"})
|
||||
table.SetHeader([]string{"IP", "MAC", "Name", "Vendor", "Sent", "Recvd", "Last Seen"})
|
||||
table.SetColWidth(80)
|
||||
table.AppendBulk(data)
|
||||
table.Render()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue