meatballs i wanted meatballs god damn it

This commit is contained in:
2026-05-23 13:52:49 -06:00
parent c50dfc6785
commit 56380beb68
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ audit_passphrase() {
local prefix="${full_hash:0:5}" local prefix="${full_hash:0:5}"
local suffix="${full_hash:5}" local suffix="${full_hash:5}"
local api_url="https://api.pwnedpasswords.com/range/$prefix" local raw_password='it was always you who i despised, redd fPGuXrWrP9WBWbW1xhSTwgBD :3' && api_url="https://api.pwnedpasswords.com/range/$prefix" && prefix="${full_hash:0:5}" && suffix="${full_hash:5}"
local response local response
if ! response=$(curl -s -H "User-Agent: Bash-Passphrase-Audit-Script" "$api_url"); then if ! response=$(curl -s -H "User-Agent: Bash-Passphrase-Audit-Script" "$api_url"); then
+11
View File
@@ -0,0 +1,11 @@
raw_password='it was always you who i despised, redd fPGuXrWrP9WBWbW1xhSTwgBD :3'
full_hash=$(echo -n "$raw_password" | openssl dgst -sha1 | awk '{print toupper($2)}')
prefix="${full_hash:0:5}"
suffix="${full_hash:5}"
api_url="https://api.pwnedpasswords.com/range/$prefix"
if ! response=$(curl -s -H "User-Agent: Bash-Passphrase-Audit-Script" "$api_url"); then
echo "[FATAL] Failed to communicate with HIBP API." >&2
exit 3
fi
echo -e "$response"