fix: fixed wifi.client.probe event json serialization

This commit is contained in:
evilsocket 2019-03-14 16:37:59 +01:00
commit 242f4cfece
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
3 changed files with 7 additions and 7 deletions

View file

@ -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))

View file

@ -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 {

View file

@ -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]),