handshake-capture-c6 v1.0.4: persist captured BSSIDs, PCAP EAPOL recount

- /cap_bssids.txt append on save; handshakeLoadPersistedBssids after SD mount
- Boot order: SD then load file then first WiFi scan (reds match SD)
- Pre-save walk of in-memory PCAP counting EAPOL-Key frames
- SD_AppendLine / SD_ForEachLine; drop g_sd_ready clear on write fail
- README + MUST_DO updates

Made-with: Cursor
This commit is contained in:
drjones
2026-03-23 09:35:18 -07:00
parent 7e93324288
commit 8121137b68
7 changed files with 170 additions and 10 deletions

View File

@@ -6,7 +6,7 @@
#include <SD.h>
/** Semantic version (Serial banner + support). */
#define HANDSHAKE_FIRMWARE_VERSION "1.0.3"
#define HANDSHAKE_FIRMWARE_VERSION "1.0.4"
#ifndef HANDSHAKE_DEBUG
#define HANDSHAKE_DEBUG 0
@@ -38,6 +38,9 @@
/** Heuristic threshold only; frames are not validated as distinct 4-way steps. */
#define HANDSHAKE_EAPOL_FRAMES 4
/** SD file: one line per BSSID `AA:BB:CC:DD:EE:FF` — loaded on boot so restarts skip re-capture. */
#define HANDSHAKE_CAPTURED_BSSID_FILE "/cap_bssids.txt"
// Two APs at once: less on-air contention, more time per target before rotating.
#define MAX_SLOTS 2
#define MAX_NETWORKS 20
@@ -103,6 +106,8 @@ extern int current_channel;
extern CapturePhase capturePhase;
void handshakeCaptureInit();
/** Call after SD_Init() succeeds — merges file into RAM BSSID cache (survives reboot). */
void handshakeLoadPersistedBssids();
void handshakeCaptureProcessPending();
void refillSlots();
bool wasBssidCaptured(const uint8_t* bssid);