diff --git a/sessions/opening/challenge/challenge.ps1 b/sessions/opening/challenge/challenge.ps1 index caf4e8e..08a56cc 100644 --- a/sessions/opening/challenge/challenge.ps1 +++ b/sessions/opening/challenge/challenge.ps1 @@ -1,6 +1,4 @@ $p = 'P@ssw0rd' -[Net.ServicePointManager]::SecurityProtocol = 'Tls12' -$a,$b = (Get-FileHash -A 'SHA1' -I ([IO.MemoryStream]:: -new([Text.Encoding]::UTF8.GetBytes($p)))).Hash -split '(?<=^.{5})' -(((irm "https://api.pwnedpasswords.com/range/$a" -UseB) -split - '\r\n' -like "$b*") -split ':')[-1] +$p|Out-File -non 'p' +$a,$b=(filehash -a SHA1 ./p).hash-split '(?<=^.{5})' +(((irm "https://api.pwnedpasswords.com/range/$a")-split '\r\n'-like "$b*")-split ':')[-1]