Re:300M Freely Downloadable Pwned Passwords
by rrauenza on Thursday August 03, 2017 @02:39PM
(#14922423)
You can post the sha1sum instead.
[ Parent
| on HN ]
Re:300M Freely Downloadable Pwned Passwords
by 13of40 on Thursday August 03, 2017 @03:49PM
(#14923132)
If you're on Windows, you can calculate it in PowerShell like this:
$password = "foobar"
([Security.Cryptography.SHA1CryptoServiceProvider]::Create().ComputeHash([Text.Encoding]::ASCII.GetBytes($password)) | %{'{0:x2}' -f $_}) -join ""
Re:300M Freely Downloadable Pwned Passwords
by Spivak on Thursday August 03, 2017 @04:15PM
(#14923390)
And people say that PowerShell isn't readable or intuitive.
Re:300M Freely Downloadable Pwned Passwords
by 13of40 on Thursday August 03, 2017 @05:27PM
(#14924048)
You can also do it like this:
"foobar" | Out-File password.txt -Encoding ASCII -NoNewline
Get-FileHash password.txt -Algorithm SHA1
del password.txt
That's readable and intuitive, but the downside is it puts your password in a file.
Re:300M Freely Downloadable Pwned Passwords
by AlexCoventry on Thursday August 03, 2017 @06:24PM
(#14924500)
sha1sum is giving different results.
/tmp$ echo "p@55w0rd" | sha1sum
8633c4a8b38a8826132414d8861af7b6a8371976 -
This is a different value from the one given in the blog post: "ce0b2b771f7d468c0141918daea704e0e5ad45db".The python sha-1 hexdigest comes out right, though:
In [13]: import sha
In [14]: sha.new('p@55w0rd').hexdigest()
Out[14]: 'ce0b2b771f7d468c0141918daea704e0e5ad45db'
In case anyone else has passwords they want to check, this will binary-search them: https://gist.github.com/coventry/5df7885fb0d5caeabb39fcd0e2b...
Re:300M Freely Downloadable Pwned Passwords
by nsillik on Thursday August 03, 2017 @07:03PM
(#14924786)
You need to use `echo -n` in order to not have `echo` generate a newline.
Re:300M Freely Downloadable Pwned Passwords
by AlexCoventry on Thursday August 03, 2017 @07:54PM
(#14925159)
Ah, thanks.
Re:300M Freely Downloadable Pwned Passwords
by mrob on Thursday August 03, 2017 @07:12PM
(#14924860)
You can also binary search with "look -b". The version included with Debian Unstable doesn't support large files, but it will search multiple files at once, so you can split without breaking lines, eg. with "split -C 1999m", and search with "look -b SHASUM splitfile*".
Re:300M Freely Downloadable Pwned Passwords
by AlexCoventry on Thursday August 03, 2017 @07:57PM
(#14925180)
Thanks, I knew there had to be an easier way, but couldn't find it.
Re:300M Freely Downloadable Pwned Passwords
by rrauenza on Friday August 04, 2017 @04:59PM
(#14932204)
Make sure you clean your .history if you're using echo to pipe the password...
Re:300M Freely Downloadable Pwned Passwords
by AlexCoventry on Saturday August 05, 2017 @04:41PM
(#14937790)
Thanks. I had done so.