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;
125 long lastBeaconTime = 0;
126 long beaconPaketDelayMs = 10;
128 wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
129 std::vector<uint8_t*> detectedClients;
130 std::vector<uint8_t*> capturedPackets;
131 std::vector<wifi_ap_record_t> foundWiFiNetworks;
159 void sendDeauthPacket(uint8_t* apMac, uint8_t* stMac, uint8_t channel, uint8_t reasonCode);
193 void processWiFiData(uint8_t* networkBSSID, uint8_t channel,
int captureTime,
bool captureHandshake,
bool detectClients);
196 uint8_t deauthPacket[26] = {
199 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
200 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
201 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC,
207 uint8_t beaconPacket[109] = {
208 0x80, 0x00, 0x00, 0x00,
209 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
210 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
211 0x01, 0x02, 0x03, 0x04, 0x05, 0x06,
215 0x83, 0x51, 0xf7, 0x8f, 0x0f, 0x00, 0x00, 0x00,
223 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,
243 0x00, 0x0f, 0xac, 0x02,
245 0x00, 0x0f, 0xac, 0x04, 0x00, 0x0f, 0xac, 0x04,
247 0x00, 0x0f, 0xac, 0x02,
251 const char*
const rickRollSSIDs[8] PROGMEM = {
252 "NeverGonnaGiveYouUp",
253 "NeverGonnaLetYouDown",
254 "NeverGonnaRunAround",
256 "NeverGonnaMakeYouCry",
257 "NeverGonnaSayGoodbye",
258 "NeverGonnaTellALie",
330 void startNetworkDeauth(uint8_t* networkSSID, uint8_t* networkBSSID, uint8_t channel,
int availableNetworkIndex, uint8_t* targetMacAddr,
int delayMs, uint8_t reasonCode);
344 void deauthNetwork(uint8_t* networkSSID, uint8_t* networkBSSID, uint8_t channel,
int availableNetworkIndex, uint8_t* targetMacAddr,
int numPackets,
int delayMs, uint8_t reasonCode);
354 void handshakeCapture(uint8_t* networkBSSID, uint8_t channel,
int availableNetworkIndex,
int captureTime);
364 void activeHandshakeCapture(uint8_t* networkBSSID, uint8_t channel,
int availableNetworkIndex,
int captureTime);
374 void findClients(uint8_t* networkBSSID, uint8_t channel,
int availableNetworkIndex,
int captureTime);
385extern 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