/* * rt_capture.h * WPA/WPA2 4-way handshake (EAPOL) capture for offline cracking. */ #pragma once #include #include #ifdef __cplusplus extern "C" { #endif #define RT_CAPTURE_MAX_EAPOL_LEN 256 /* Captured EAPOL frame */ typedef struct { uint8_t data[RT_CAPTURE_MAX_EAPOL_LEN]; size_t len; uint8_t msg_num; /* 1-4 for each handshake message */ } rt_eapol_frame_t; /* Capture result */ typedef struct { uint8_t bssid[6]; uint8_t client[6]; rt_eapol_frame_t frames[4]; /* M1..M4 */ uint8_t captured; /* bitmask: bit 0=M1, bit 1=M2, etc. */ bool complete; /* all 4 messages captured */ } rt_capture_result_t; /* * Start handshake capture. * bssid – target AP BSSID (6 bytes) * channel – WiFi channel (1-13), 0 = current * send_deauth – if true, send a few deauth frames to force reconnection */ void rt_capture_start(const uint8_t bssid[6], uint8_t channel, bool send_deauth); /* Stop capture. */ void rt_capture_stop(void); /* True if capture is running. */ bool rt_capture_is_active(void); /* Get the current capture result (may be incomplete). */ const rt_capture_result_t *rt_capture_get_result(void); #ifdef __cplusplus } #endif