Add prompt to exit the script

Prevent the script to be closed automatically if you run it by right clicking the file and choose *Run with PowerShell*
This commit is contained in:
Luca Poldelmengo 2019-03-15 11:47:02 +01:00 committed by GitHub
parent 8efd8ffedd
commit ddbf8d33ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
$string = Read-Host -Prompt 'Password to check'
$string = Read-Host -Prompt 'Password to check'
$bytes = [System.Text.Encoding]::UTF8.GetBytes($string)
$sha1 = New-Object System.Security.Cryptography.SHA1CryptoServiceProvider
$data = $sha1.ComputeHash($bytes)
@ -20,3 +20,5 @@ while (($line = $reader.ReadLine()) -ne $null) {
}
}
if ($found -eq 0) { Write-Host "That password was not found." }
Read-Host -Prompt "Press Enter to exit"