/* * rt_karma.h * Karma attack — respond to WiFi probe requests with matching SSIDs * to lure clients into connecting to our rogue AP. */ #pragma once #include #include #ifdef __cplusplus extern "C" { #endif #define RT_KARMA_MAX_CLIENTS 32 /* Info about a client that sent a probe request */ typedef struct { uint8_t mac[6]; char ssid[33]; /* SSID they were looking for */ int64_t first_seen_ms; int64_t last_seen_ms; bool connected; /* true if they connected to our AP */ } rt_karma_client_t; /* * Start karma listener. * duration_s – 0 = run until rt_karma_stop(), >0 = auto-stop after N seconds */ void rt_karma_start(uint32_t duration_s); /* Stop karma and tear down the rogue AP. */ void rt_karma_stop(void); /* True if karma is running. */ bool rt_karma_is_active(void); /* Get list of clients that sent probe requests. Returns count. */ int rt_karma_get_clients(rt_karma_client_t *out, int max_count); #ifdef __cplusplus } #endif