illwill

Windows Powershell WiFi password dump one-liner

Oct 1st, 2017
3,951
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (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 | Out-File $env:USERPROFILE\Desktop\Log.txt
Add Comment
Please, Sign In to add comment