23#include "esp_event_loop.h"
25#include "esp_system.h"
27#include "esp_wifi_types.h"
28#include "freertos/FreeRTOS.h"
31esp_err_t esp_wifi_set_channel(uint8_t primary, wifi_second_chan_t second);
32esp_err_t esp_wifi_80211_tx(wifi_interface_t ifx,
const void* buffer,
int len,
bool en_sys_seq);
33esp_err_t esp_wifi_set_storage(wifi_storage_t storage);
34esp_err_t esp_wifi_set_mode(wifi_mode_t mode);
35esp_err_t esp_wifi_start();
36esp_err_t esp_wifi_set_promiscuous(
bool en);
43 unsigned frame_ctrl : 16;
44 unsigned duration_id : 16;
48 unsigned sequence_ctrl : 16;
71 uint8_t replay_counter[8];
106 const bool wpa2 =
true;
108 uint8_t channelIndex = 0;
110 uint8_t randomMacAddr[6];
111 uint8_t wifiChannel = 1;
112 uint32_t currentTime = 0;
113 uint32_t packetSize = 0;
114 uint32_t packetCounter = 0;
115 uint32_t attackTime = 0;
116 uint32_t packetRateTime = 0;
117 uint8_t targetBSSID[6];
118 uint8_t targetChannel;
120 fs::SDFS* sd =
nullptr;
123 long lastDeauthTime = 0;
124 int lastBeconIndex = 0;
126 wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
127 std::vector<uint8_t*> detectedClients;
128 std::vector<uint8_t*> capturedPackets;
129 std::vector<wifi_ap_record_t> foundWiFiNetworks;
151 void sendDeauthPacket(uint8_t* apMac, uint8_t* stMac, uint8_t channel, uint8_t reasonCode);
185 void processWiFiData(uint8_t* networkBSSID, uint8_t channel,
int captureTime,
bool captureHandshake,
bool detectClients);
188 uint8_t deauthPacket[26] = {
191 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
192 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
193 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
199 uint8_t beaconPacket[109] = {
200 0x80, 0x00, 0x00, 0x00,
201 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
202 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
203 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
207 0x83, 0x51, 0xf7, 0x8f, 0x0f, 0x00, 0x00, 0x00,
215 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
235 0x00, 0x0f, 0xac, 0x02,
237 0x00, 0x0f, 0xac, 0x04, 0x00, 0x0f, 0xac, 0x04,
239 0x00, 0x0f, 0xac, 0x02,
243 const char*
const rickRollSSIDs[8] PROGMEM = {
244 "NeverGonnaGiveYouUp",
245 "NeverGonnaLetYouDown",
246 "NeverGonnaRunAround",
248 "NeverGonnaMakeYouCry",
249 "NeverGonnaSayGoodbye",
250 "NeverGonnaTellALie",
322 void startNetworkDeauth(uint8_t* networkSSID, uint8_t* networkBSSID, uint8_t channel,
int availableNetworkIndex, uint8_t* targetMacAddr,
int delayMs, uint8_t reasonCode);
336 void deauthNetwork(uint8_t* networkSSID, uint8_t* networkBSSID, uint8_t channel,
int availableNetworkIndex, uint8_t* targetMacAddr,
int numPackets,
int delayMs, uint8_t reasonCode);
346 void handshakeCapture(uint8_t* networkBSSID, uint8_t channel,
int availableNetworkIndex,
int captureTime);
366 void findClients(uint8_t* networkBSSID, uint8_t channel,
int availableNetworkIndex,
int captureTime);
370extern WiFiTools* globalWiFiToolsInstance;
Struct to store the information of a 4-way handshake.
Definition WiFiTools.h:65
Definition WiFiTools.h:76
Struct to store the MAC header of a Wi-Fi packet.
Definition WiFiTools.h:42
Struct to store the payload of a Wi-Fi packet.
Definition WiFiTools.h:56