journal
all ![]() | Rob is 20,118 days old today. |
Oct 2018 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Dec 2018 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 2017 jan feb mar apr may jun jul aug sep oct nov dec
2019 jan feb mar apr may jun jul aug sep oct nov dec |< << more >> >| |
Entries this day: check-if-password-has-been-compromised check if password has been compromised 13:18 Thursday 08 November 2018 JSTI wanted to write a Bash script which would take a file with a list of passwords and throw each one at Troy Hunt's collection of compromised passwords. I probably won't do it soon because I found a [bash one-liner which checks to see if a password was compromised](https://medium.com/@monliclican/bash-one-liner-to-check-your-password-s-via-pwnedpasswords-coms-api-using-the-k-anonymity-method-a5807a9a8056). I had to modify it slightly, but this line works on my Mac: echo "pass> "; read -s pass_str; sha1=$(echo -n $pass_str | tr -d '\n' | shasum); echo "Hash prefix: ${sha1:0:5}"; echo "Hash suffix: ${sha1:5:35}"; result=$(curl https://api.pwnedpasswords.com/range/${sha1:0:5} 2>/dev/null | grep $(echo ${sha1:5:35} | tr '[:lower:]' '[:upper:]')); echo "Count: ${result#*:}"permalink prev day next day |