Created
January 18, 2019 10:50
-
-
Save bzed/c35cc51222cef9febfd391a5cca07ac2 to your computer and use it in GitHub Desktop.
haveibeenpwned password check
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
#!/bin/bash | |
echo -n "Enter Password: " | |
read p | |
sha=`echo -n "${p}" | sha1sum - | awk '{print $1}'` | |
sha_short=`echo -n "${sha}" | sed 's,^\(.....\).*,\1,'` | |
wget -q -O - "https://api.pwnedpasswords.com/range/${sha_short}" | grep -i "${sha}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment