Advertisement
pleasedontcode

Wi-Fi Jammer Code

Nov 11th, 2024
600
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Arduino 0.64 KB | Source Code | 0 0
  1. #include <WiFi.h>
  2.  
  3. void setup() {
  4.   Serial.begin(115200);
  5.   WiFi.mode(WIFI_STA);
  6.   delay(100);
  7.   Serial.println("Starting Wi-Fi jammer...");
  8.  
  9.   // The channel you want to disrupt
  10.   int channel = 6; // Change to any channel from 1-13 as needed
  11.   WiFi.disconnect();
  12.   wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
  13.   esp_wifi_init(&cfg);
  14.   esp_wifi_set_country(&wifi_country_t{"US", 1, 13, WIFI_COUNTRY_POLICY_MANUAL});
  15.   esp_wifi_set_channel(channel, WIFI_SECOND_CHAN_NONE);
  16.  
  17.   Serial.println("Jamming started on channel " + String(channel));
  18. }
  19.  
  20. void loop() {
  21.   // This loop sends de-authentication packets in the background
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement