From f8ede4ddbed1707f5cb8242f49022f1348ba0bed Mon Sep 17 00:00:00 2001 From: evilsocket Date: Sun, 29 Jul 2018 16:23:52 +0200 Subject: [PATCH] fix: better mass deauth message --- network/lan_endpoint.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/network/lan_endpoint.go b/network/lan_endpoint.go index 149497eb..76d7cd21 100644 --- a/network/lan_endpoint.go +++ b/network/lan_endpoint.go @@ -140,13 +140,17 @@ func (t *Endpoint) IsMonitor() bool { } func (t *Endpoint) String() string { + ipPart := fmt.Sprintf("%s : ", t.IpAddress) + if t.IpAddress == MonitorModeAddress { + ipPart = "" + } + if t.HwAddress == "" { return t.IpAddress } else if t.Vendor == "" { - return fmt.Sprintf("%s : %s", t.IpAddress, t.HwAddress) + return fmt.Sprintf("%s%s", ipPart, t.HwAddress) } else if t.Hostname == "" { - return fmt.Sprintf("%s : %s ( %s )", t.IpAddress, t.HwAddress, t.Vendor) + return fmt.Sprintf("%s%s ( %s )", ipPart, t.HwAddress, t.Vendor) } - - return fmt.Sprintf("%s : %s ( %s ) - %s", t.IpAddress, t.HwAddress, t.Vendor, core.Bold(t.Hostname)) + return fmt.Sprintf("%s%s ( %s ) - %s", ipPart, t.HwAddress, t.Vendor, core.Bold(t.Hostname)) }