Verified Commit dd8d9389 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Improve formatting of a small bit of Bash script

parent 6dff38ff
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@ hash=$(printf "$REPLY"|sha1sum|cut -f1 -d\ |tr a-z A-Z)
prefix=$(head -c5 <<<"$hash")

IFS=$'\n\r:'
curl -s https://api.pwnedpasswords.com/range/$prefix|while read suffix count; do
curl -s https://api.pwnedpasswords.com/range/$prefix |
while read suffix count; do
	[[ $prefix$suffix == $hash ]] || continue
	echo "${RED}${BOLD}${count}${RESET}${RED}" \
		"people have had their accounts broken into using the password" \