fix: net.recon default sorting is by address

This commit is contained in:
evilsocket 2018-01-24 13:13:34 +01:00
commit 35891c0615

View file

@ -228,14 +228,14 @@ func (d *Discovery) Show(by string) error {
targets = append(targets, t) targets = append(targets, t)
} }
if by == "address" { if by == "seen" {
sort.Sort(ByAddressSorter(targets))
} else if by == "seen" {
sort.Sort(BySeenSorter(targets)) sort.Sort(BySeenSorter(targets))
} else if by == "sent" { } else if by == "sent" {
sort.Sort(BySentSorter(targets)) sort.Sort(BySentSorter(targets))
} else if by == "rcvd" { } else if by == "rcvd" {
sort.Sort(ByRcvdSorter(targets)) sort.Sort(ByRcvdSorter(targets))
} else {
sort.Sort(ByAddressSorter(targets))
} }
data = make([][]string, nTargets) data = make([][]string, nTargets)