Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rick Roll

In the end of setup():

  pinMode(D6, INPUT_PULLUP); // enable button pin

At the end of loop():

  if(digitalRead(D6)){
    if(!attack.isRunning()){
      serialInterface.runCommand("stopap");                    // stop access point and web interface
      serialInterface.runCommand("set beaconinterval true");   // change beacon interval from 10/s to 1/s for better performance
      serialInterface.runCommand("set beaconchannel true");    // send ssids on a different channels
      
      // adding SSIDs
      serialInterface.runCommand("remove ssids");
      serialInterface.runCommand("add ssid \"Never gonna give you up\" -cl 6 -f");
      serialInterface.runCommand("add ssid \"Never gonna let you down\" -cl 6 -f");
      serialInterface.runCommand("add ssid \"Never gonna run around\" -cl 6 -f");
      serialInterface.runCommand("add ssid \"and desert you\" -cl 6 -f");
      serialInterface.runCommand("add ssid \"Never gonna make you cry\" -cl 6 -f");
      serialInterface.runCommand("add ssid \"and desert you\" -cl 6 -f");
      serialInterface.runCommand("add ssid \"Never gonna say goodbye\" -cl 6 -f");
      serialInterface.runCommand("add ssid \"Never gonna tell a lie and hurt you\" -cl 6 -f");
      
      serialInterface.runCommand("attack -b");                // start beacon attack
    }
  }else{
    if(attack.isRunning()){
      attack.stop();                        // stop attack
      serialInterface.runCommand("startap"); // start access point for web interface again
    }
  }

In a_config-h:

//#define DIGITAL_LED
//#define RGB_LED
#define NEOPIXEL_LED

and

// === Settings for Neopixel LED === //
#define LED_NEOPIXEL_NUM 1
#define LED_NEOPIXEL_PIN 13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment