mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: fixed wifi.client.probe event json serialization
This commit is contained in:
parent
c8e9d11871
commit
242f4cfece
3 changed files with 7 additions and 7 deletions
|
@ -60,7 +60,7 @@ func (mod *EventsStream) viewWiFiClientProbeEvent(e session.Event) {
|
||||||
fmt.Fprintf(mod.output, "[%s] [%s] station %s%s is probing for SSID %s%s\n",
|
fmt.Fprintf(mod.output, "[%s] [%s] station %s%s is probing for SSID %s%s\n",
|
||||||
e.Time.Format(mod.timeFormat),
|
e.Time.Format(mod.timeFormat),
|
||||||
tui.Green(e.Tag),
|
tui.Green(e.Tag),
|
||||||
probe.FromAddr.String(),
|
probe.FromAddr,
|
||||||
tui.Dim(desc),
|
tui.Dim(desc),
|
||||||
tui.Bold(probe.SSID),
|
tui.Bold(probe.SSID),
|
||||||
tui.Yellow(rssi))
|
tui.Yellow(rssi))
|
||||||
|
|
|
@ -12,11 +12,11 @@ type ClientEvent struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProbeEvent struct {
|
type ProbeEvent struct {
|
||||||
FromAddr net.HardwareAddr
|
FromAddr string `json:"mac"`
|
||||||
FromVendor string
|
FromVendor string `json:"vendor"`
|
||||||
FromAlias string
|
FromAlias string `json:"alias"`
|
||||||
SSID string
|
SSID string `json:"essid"`
|
||||||
RSSI int8
|
RSSI int8 `json:"rssi"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type HandshakeEvent struct {
|
type HandshakeEvent struct {
|
||||||
|
|
|
@ -108,7 +108,7 @@ func (mod *WiFiModule) discoverProbes(radiotap *layers.RadioTap, dot11 *layers.D
|
||||||
}
|
}
|
||||||
|
|
||||||
mod.Session.Events.Add("wifi.client.probe", ProbeEvent{
|
mod.Session.Events.Add("wifi.client.probe", ProbeEvent{
|
||||||
FromAddr: dot11.Address2,
|
FromAddr: dot11.Address2.String(),
|
||||||
FromVendor: network.ManufLookup(dot11.Address2.String()),
|
FromVendor: network.ManufLookup(dot11.Address2.String()),
|
||||||
FromAlias: mod.Session.Lan.GetAlias(dot11.Address2.String()),
|
FromAlias: mod.Session.Lan.GetAlias(dot11.Address2.String()),
|
||||||
SSID: string(req.Contents[2 : 2+size]),
|
SSID: string(req.Contents[2 : 2+size]),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue