Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
akhi07rx committed Jun 24, 2023
1 parent 47e5981 commit a8a573b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions show_wifi_pass.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(netsh wlan show profiles) | Select-String "All User Profile" | ForEach-Object {
$ssid = $_.Line.Split(':')[1].Trim()
$profile = (netsh wlan show profile name=$ssid key=clear)
$passwordLine = $profile | Select-String "Key Content"
if ($passwordLine -ne $null) {
$password = $passwordLine.Line.Split(':')[1].Trim()
"SSID: $ssid`nPassword: $password`n"
}
} | Out-File -FilePath "$env:USERPROFILE\Desktop\wifipass.txt"

0 comments on commit a8a573b

Please sign in to comment.