Skip to content

Instantly share code, notes, and snippets.

@spacehuhn
Created May 12, 2018 18:09
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spacehuhn/4b5db00e2a2d3eafb6ead241f7a878b1 to your computer and use it in GitHub Desktop.
Save spacehuhn/4b5db00e2a2d3eafb6ead241f7a878b1 to your computer and use it in GitHub Desktop.
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