Advertisement
pleasedontcode

"Channel Disruption" rev_01

Nov 12th, 2024
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /********* Pleasedontcode.com **********
  2.  
  3.     Pleasedontcode thanks you for automatic code generation! Enjoy your code!
  4.  
  5.     - Terms and Conditions:
  6.     You have a non-exclusive, revocable, worldwide, royalty-free license
  7.     for personal and commercial use. Attribution is optional; modifications
  8.     are allowed, but you're responsible for code maintenance. We're not
  9.     liable for any loss or damage. For full terms,
  10.     please visit pleasedontcode.com/termsandconditions.
  11.  
  12.     - Project: "Channel Disruption"
  13.     - Source Code NOT compiled for: ESP32 DevKit V1
  14.     - Source Code created on: 2024-11-12 10:43:42
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* The project aims to develop an Arduino-based */
  21.     /* system that utilizes connected components for */
  22.     /* automated tasks, ensuring efficient resource */
  23.     /* management and user-friendly interaction. */
  24. /****** END SYSTEM REQUIREMENTS *****/
  25.  
  26. /* START CODE */
  27.  
  28. /****** DEFINITION OF LIBRARIES *****/
  29. #include <WiFi.h>
  30.  
  31. /****** FUNCTION PROTOTYPES *****/
  32. void setup(void);
  33. void loop(void);
  34.  
  35. // Wi-Fi configuration parameters
  36. const char* ssid = "your_SSID"; // Replace with your network SSID
  37. const char* password = "your_PASSWORD"; // Replace with your network password
  38.  
  39. void setup(void)
  40. {
  41.     // Initialize serial communication
  42.     Serial.begin(115200);
  43.     WiFi.mode(WIFI_STA);
  44.     delay(100);
  45.     Serial.println("Starting Wi-Fi jammer...");
  46.  
  47.     // Connect to Wi-Fi
  48.     WiFi.begin(ssid, password);
  49.     while (WiFi.status() != WL_CONNECTED) {
  50.         delay(1000);
  51.         Serial.println("Connecting to WiFi...");
  52.     }
  53.     Serial.println("Connected to WiFi");
  54.  
  55.     // The channel you want to disrupt
  56.     int channel = 6; // Change to any channel from 1-13 as needed
  57.     WiFi.disconnect();
  58.     wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
  59.     esp_wifi_init(&cfg);
  60.     esp_wifi_set_country(&wifi_country_t{"US", 1, 13, WIFI_COUNTRY_POLICY_MANUAL});
  61.     esp_wifi_set_channel(channel, WIFI_SECOND_CHAN_NONE);
  62.  
  63.     Serial.println("Jamming started on channel " + String(channel));
  64. }
  65.  
  66. void loop(void)
  67. {
  68.     // This loop sends de-authentication packets in the background
  69.     // Note: The actual implementation for sending de-authentication packets is missing.
  70.     // You would need to implement that functionality here.
  71. }
  72.  
  73. /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement