-
-
Save thalex/31bd42e8e3d44e9b18f4c4b2370ddc0c to your computer and use it in GitHub Desktop.
One-liner password leak check + k-anonymity method (w/out exposing the password on request)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## One-liner password leak check + k-anonymity method (w/out exposing the password on request) | |
# Compute the SHA1, Grab 1st 5 chars of the hash, check by range on huge haveibeenpwnd DB! | |
# original source: https://news.ycombinator.com/item?id=16432344 | |
VARPWD='test123'; HASH=`echo -n $VARPWD | sha1sum`; curl --silent https://api.pwnedpasswords.com/range/`cut -b 1-5 <(echo $HASH)` --stderr - | grep -i `cut -b 6- <(echo $HASH) | cut -d ' ' -f 1` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment