Politician 1.0.0
WiFi Auditing Library for ESP32
Loading...
Searching...
No Matches
politician::storage::WigleCsvLogger Class Reference

Helper for writing precise GPS location coordinates to a Wigle.net compatible CSV file. More...

#include <PoliticianStorage.h>

Static Public Member Functions

static bool append (fs::FS &fs, const char *path, const HandshakeRecord &rec, float lat, float lon, float alt=0.0, float acc=10.0, const char *timestamp=nullptr)
 Appends a HandshakeRecord's details alongside GPS coordinates to a Wigle CSV.
 
static bool appendAp (fs::FS &fs, const char *path, const ApRecord &ap, float lat, float lon, float alt=0.0, float acc=10.0, const char *timestamp=nullptr)
 Appends any discovered ApRecord alongside GPS coordinates to a Wigle CSV.
 

Detailed Description

Helper for writing precise GPS location coordinates to a Wigle.net compatible CSV file.

Wigle.net has a strict CSV format starting with a specific header: MAC,SSID,AuthMode,FirstSeen,Channel,RSSI,CurrentLatitude,CurrentLongitude,AltitudeMeters,AccuracyMeters,Type

Definition at line 135 of file PoliticianStorage.h.

Member Function Documentation

◆ append()

static bool politician::storage::WigleCsvLogger::append ( fs::FS &  fs,
const char *  path,
const HandshakeRecord rec,
float  lat,
float  lon,
float  alt = 0.0,
float  acc = 10.0,
const char *  timestamp = nullptr 
)
inlinestatic

Appends a HandshakeRecord's details alongside GPS coordinates to a Wigle CSV.

Parameters
fsThe filesystem (e.g., SD, LittleFS)
pathThe path to the file (e.g., "/wardrive.csv")
recThe captured HandshakeRecord
latCurrent GPS Latitude
lonCurrent GPS Longitude
alt(Optional) Current GPS Altitude in meters
acc(Optional) GPS Accuracy radius in meters
Returns
true if successful, false if file could not be opened

Definition at line 149 of file PoliticianStorage.h.

References politician::HandshakeRecord::bssid, politician::HandshakeRecord::channel, politician::HandshakeRecord::enc, politician::HandshakeRecord::rssi, and politician::HandshakeRecord::ssid.

◆ appendAp()

static bool politician::storage::WigleCsvLogger::appendAp ( fs::FS &  fs,
const char *  path,
const ApRecord ap,
float  lat,
float  lon,
float  alt = 0.0,
float  acc = 10.0,
const char *  timestamp = nullptr 
)
inlinestatic

Appends any discovered ApRecord alongside GPS coordinates to a Wigle CSV.

Use this with setApFoundCallback() to log all networks, not just captured ones.

Parameters
fsThe filesystem (e.g., SD, LittleFS)
pathThe path to the file (e.g., "/wardrive.csv")
apThe discovered ApRecord
latCurrent GPS Latitude
lonCurrent GPS Longitude
alt(Optional) Current GPS Altitude in meters
acc(Optional) GPS Accuracy radius in meters
Returns
true if successful, false if file could not be opened

Definition at line 180 of file PoliticianStorage.h.

References politician::ApRecord::bssid, politician::ApRecord::channel, politician::ApRecord::enc, politician::ApRecord::rssi, and politician::ApRecord::ssid.


The documentation for this class was generated from the following file: