Skip to content

Instantly share code, notes, and snippets.

@m4l1c3
m4l1c3 / Interesting way to find cleartext wifi creds on windows
Created September 18, 2018 16:45
I found this on pastebin, not the author putting here in case it disappears. Original: https://pastebin.com/MuUdJaG7
(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 }}