Commit 932d2fa4 authored by Gabriel Moreau's avatar Gabriel Moreau
Browse files

More robust (not perfect)

parent e4ac6193
$KeyFile = Read-Host -Prompt "Key File"
$BlurPassword = Read-Host -Prompt "Blur Password"
Do {
$KeyFile = Read-Host -Prompt "Key File"
} Until (Test-Path -LiteralPath "$KeyFile")
$Password = $BlurPassword | ConvertTo-SecureString -Key (Get-Content $KeyFile)
$EncryptedPass = Read-Host -Prompt "Encrypted blurred Password"
$Password = $EncryptedPass | ConvertTo-SecureString -Key (Get-Content $KeyFile)
$Credential = New-Object System.Management.Automation.PsCredential('AsYouWant',$Password)
$PlainPassword = $Credential.GetNetworkCredential().Password
Write-Output $PlainPassword
Write-Output "Password in clear text: $PlainPassword"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment