Skip to content

Instantly share code, notes, and snippets.

@xiongnemo
Created September 9, 2020 12:51
Show Gist options
  • Save xiongnemo/dc79fb585c8ade3eee9b602e11fce639 to your computer and use it in GitHub Desktop.
Save xiongnemo/dc79fb585c8ade3eee9b602e11fce639 to your computer and use it in GitHub Desktop.
Powershell script revealing saved WLAN passwords (https://twitter.com/Intel80x86/status/1303636194589372416)
(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 }} | `
Format-Table -AutoSize
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment