/* * rt_hunt.h * Red Team hunt state machine — autonomous network hunting. */ #pragma once #include #ifdef __cplusplus extern "C" { #endif /* ============================================================ * Hunt states * ============================================================ */ typedef enum { RT_IDLE, RT_STEALTH_PREP, RT_PASSIVE_SCAN, RT_MESH_PROBE, RT_MESH_RELAY, RT_TRYING_KNOWN, RT_TRYING_OPEN, RT_TRYING_WPA, RT_PORTAL_CHECK, RT_PORTAL_BYPASS, RT_C2_VERIFY, RT_CONNECTED, RT_GPRS, } rt_state_t; /* ============================================================ * API * ============================================================ */ /* Trigger the hunt (start the state machine task if not running). * Called by C2 command or auto-trigger on TCP failure. */ void rt_hunt_trigger(void); /* Stop the hunt, restore original WiFi + MAC + TX power. */ void rt_hunt_stop(void); /* Get current state. */ rt_state_t rt_hunt_get_state(void); /* Get state name as string. */ const char *rt_hunt_state_name(rt_state_t state); /* Is the hunt task currently running? */ bool rt_hunt_is_active(void); /* Get the SSID we connected to (empty if none). */ const char *rt_hunt_connected_ssid(void); /* Get the method used to connect (e.g. "known", "open", "wpa", "mesh"). */ const char *rt_hunt_connected_method(void); #ifdef __cplusplus } #endif