mirror of
https://github.com/bettercap/bettercap.git
synced 2024-11-08 06:30:13 -08:00
25 lines
513 B
Go
25 lines
513 B
Go
package events_stream
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/bettercap/bettercap/v2/session"
|
|
"github.com/evilsocket/islazy/tui"
|
|
)
|
|
|
|
func (mod *EventsStream) viewGPSEvent(output io.Writer, e session.Event) {
|
|
if e.Tag == "gps.new" {
|
|
gps := e.Data.(session.GPS)
|
|
|
|
fmt.Fprintf(output, "[%s] [%s] latitude:%f longitude:%f quality:%s satellites:%d altitude:%f\n",
|
|
e.Time.Format(mod.timeFormat),
|
|
tui.Green(e.Tag),
|
|
gps.Latitude,
|
|
gps.Longitude,
|
|
gps.FixQuality,
|
|
gps.NumSatellites,
|
|
gps.Altitude)
|
|
}
|
|
}
|