this is my life now. infinite frustration cast upon me by an evil curse

This commit is contained in:
2026-05-23 11:33:43 -06:00
parent 738a794d89
commit 568ee014d4
2 changed files with 107 additions and 23 deletions
+5 -5
View File
@@ -13,7 +13,7 @@ audit_passphrase() {
if [[ -z "$raw_password" ]]; then
echo "[ERROR] No passphrase provided for validation." >&2
return 2
exit 2
fi
# --------------------------------------------------------------------------
@@ -22,7 +22,7 @@ audit_passphrase() {
local pass_len="${#raw_password}"
if [ "$pass_len" -lt 35 ]; then
echo "❌ REJECTED: Passphrase is too short ($pass_len characters). Minimum length required is 35."
return 1
exit 1
fi
echo " [PASS] Length verification satisfied ($pass_len characters)."
@@ -39,7 +39,7 @@ audit_passphrase() {
if [[ "$cracklib_result" != "OK" ]]; then
echo "❌ REJECTED by cracklib-check: $cracklib_result"
return 1
exit 1
fi
echo " [PASS] Local dictionary and structural complexity audit clear."
fi
@@ -57,7 +57,7 @@ audit_passphrase() {
if ! response=$(curl -s -H "User-Agent: Bash-Passphrase-Audit-Script" "$api_url"); then
echo "[FATAL] Failed to communicate with HIBP API." >&2
return 3
exit 3
fi
local match
@@ -67,7 +67,7 @@ audit_passphrase() {
local pwn_count
pwn_count=$(echo "$match" | cut -d':' -f2 | tr -d $'\r')
echo "❌ VULNERABLE: This passphrase has appeared in $pwn_count known public breaches."
return 1
exit 1
else
echo "✅ SUCCESS: Passphrase meets all local criteria and was not found in HIBP records."
return 0