mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
new: implemented ble.enum and refactored how tabular views work ( ref #74 )
This commit is contained in:
parent
b8e48e7f8a
commit
ec58c55370
9 changed files with 341 additions and 52 deletions
|
@ -19,7 +19,6 @@ import (
|
|||
"github.com/google/gopacket/pcap"
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/olekukonko/tablewriter"
|
||||
)
|
||||
|
||||
var maxStationTTL = 5 * time.Minute
|
||||
|
@ -218,15 +217,6 @@ func mhz2chan(freq int) int {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (w *WiFiRecon) showTable(header []string, rows [][]string) {
|
||||
fmt.Println()
|
||||
table := tablewriter.NewWriter(os.Stdout)
|
||||
table.SetHeader(header)
|
||||
table.SetColWidth(80)
|
||||
table.AppendBulk(rows)
|
||||
table.Render()
|
||||
}
|
||||
|
||||
func (w *WiFiRecon) isApSelected() bool {
|
||||
return w.ap != nil
|
||||
}
|
||||
|
@ -274,7 +264,7 @@ func (w *WiFiRecon) Show(by string) error {
|
|||
}
|
||||
|
||||
if nrows > 0 {
|
||||
w.showTable(columns, rows)
|
||||
core.AsTable(os.Stdout, columns, rows)
|
||||
}
|
||||
|
||||
w.Session.Refresh()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue