Created
March 19, 2018 11:18
-
-
Save intrd/f95053a409b1a9f5ad3d1fe0881773f8 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 hidden or 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