Created
February 24, 2018 05:47
-
-
Save ryan0x44/67abdef6e4eef7f7f4206efa437e7812 to your computer and use it in GitHub Desktop.
Find out how many times your password has been pwned
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 | |
# set pw to the password you want to lookup (of course, be careful with writing this to your shell history or unencrypted disk!) | |
pw="insecure" | |
# this will output the number of times it has been pwned | |
s=$(echo -n $pw | openssl sha1 | tr '[a-z]' '[A-Z]'); curl -s "https://api.pwnedpasswords.com/range/${s:0:5}" | grep "${s:5}" | cut -d ":" -f 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Read more here: https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/