mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
balls
This commit is contained in:
parent
6bd88bc7e3
commit
6c7d580868
1 changed files with 3 additions and 1 deletions
|
@ -126,7 +126,9 @@ func (d *Discovery) Show(by string) error {
|
||||||
sort.Sort(ByAddressSorter(targets))
|
sort.Sort(ByAddressSorter(targets))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pad := 1
|
||||||
if d.Session.Interface.HwAddress == d.Session.Gateway.HwAddress {
|
if d.Session.Interface.HwAddress == d.Session.Gateway.HwAddress {
|
||||||
|
pad = 0
|
||||||
targets = append([]*net.Endpoint{d.Session.Interface}, targets...)
|
targets = append([]*net.Endpoint{d.Session.Interface}, targets...)
|
||||||
} else {
|
} else {
|
||||||
targets = append([]*net.Endpoint{d.Session.Interface, d.Session.Gateway}, targets...)
|
targets = append([]*net.Endpoint{d.Session.Interface, d.Session.Gateway}, targets...)
|
||||||
|
@ -135,7 +137,7 @@ func (d *Discovery) Show(by string) error {
|
||||||
rows := make([][]string, 0)
|
rows := make([][]string, 0)
|
||||||
for i, t := range targets {
|
for i, t := range targets {
|
||||||
rows = append(rows, d.getRow(t))
|
rows = append(rows, d.getRow(t))
|
||||||
if i == 1 {
|
if i == pad {
|
||||||
rows = append(rows, []string{"", "", "", "", "", "", ""})
|
rows = append(rows, []string{"", "", "", "", "", "", ""})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue