From 56380beb68a35fb6bd8218ffc97a870aa45812c0 Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Sat, 23 May 2026 13:52:49 -0600 Subject: [PATCH] meatballs i wanted meatballs god damn it --- create-attributable-archive.sh | 2 +- scratch.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 scratch.sh diff --git a/create-attributable-archive.sh b/create-attributable-archive.sh index 803ff3f..53c1b01 100755 --- a/create-attributable-archive.sh +++ b/create-attributable-archive.sh @@ -167,7 +167,7 @@ audit_passphrase() { local prefix="${full_hash:0: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 if ! response=$(curl -s -H "User-Agent: Bash-Passphrase-Audit-Script" "$api_url"); then diff --git a/scratch.sh b/scratch.sh new file mode 100644 index 0000000..2fddeb1 --- /dev/null +++ b/scratch.sh @@ -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" \ No newline at end of file