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
#!/bin/bash | |
echo -n Password: | |
read -s password | |
echo | |
hash="$(echo -n $password | openssl sha1)" | |
upperCase="$(echo $hash | tr '[a-z]' '[A-Z]')" | |
prefix="${upperCase:0:5}" | |
response=$(curl -s https://api.pwnedpasswords.com/range/$prefix) | |
while read -r line; do |
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
#!/bin/bash | |
######################################################################################## | |
# 1passwordpwnedcheck.sh - script to check 1password entries against known compromised | |
# passwords from haveibeenpwned.com | |
# | |
# Requirements: | |
# 1password CLI tool - https://app-updates.agilebits.com/product_history/CLI | |
# jq json parser - https://stedolan.github.io/jq/ | |
# |
OlderNewer