Saturday, June 13, 2020

#98: How to know WIFI password?


PROBLEM:

It is quite obvious to forget password and keep trying password again and again. It happens with WIFI also and gives a real hard time. 


SOLUTION:

To get WIFI password, you can try below command, quick and simple. 

(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]@{ ProfileName=$name;Password=$pass }}


NOTE:
With this method, you get your WIFI profiles password, not your neighbour's ðŸ˜„.

Happy scripting!!!

No comments:

Post a Comment

#112: How to handle xml document in Powershell?

 In PowerShell, you can handle XML data using various cmdlets and methods provided by the .NET Framework. Here's a basic guide on how to...