You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Write-Warning-Message "Oh No! - Password has been pwned - Change it NOW! `nYou should sign up for free at https://haveibeenpwned.com/ to be notified when your account is in a breach"
120
+
if ($Response.Content.Contains($sha1Suffix.ToUpper())) {
121
+
# Password has been pwned
122
+
Write-Warning-Message "Oh No! - Password has been pwned - Change it NOW! `nYou should sign up for free at https://haveibeenpwned.com/ to be notified when your account is in a breach"
123
+
}
124
+
else {
125
+
Write-Output"Hurrah! - No Password found - Congratulations this password has not been pwned. `nYou should still sign up for free at https://haveibeenpwned.com/ to be notified when your account is in a breach"
126
+
}
113
127
}
114
128
}
115
129
end {
@@ -123,7 +137,7 @@ function Get-PwnedPassword {
123
137
124
138
.AUTHOR Rob Sewell @sqldbawithbeard https://sqldbawithabeard.com
125
139
126
-
.DESCRIPTION Connects to the API at https://haveibeenpwned.com/ to see if a Password or Password hash has been found in a breach. Troy Hunt @troyhunt has created an API which allows you to query if a Password has been found in a breach. This is a simple function enabling you to query it
140
+
.DESCRIPTION Connects to the API at https://api.pwnedpasswords.com/ to see if a Password or Password hash has been found in a breach. Troy Hunt @troyhunt has created an API which allows you to query if a Password has been found in a breach. This is a simple function enabling you to query it
0 commit comments