From 9d9bc5772d3d411a1cdabbea7080e49d951d30b3 Mon Sep 17 00:00:00 2001 From: MegaBrutal Date: Wed, 1 Oct 2025 01:00:00 +0200 Subject: [PATCH] check-blacklist.sh: Another fix for false positives Seems like the previous attempt was not enough to fix all cases of false positives. Now ignore DiG comment lines (errors) altogether. modified: host/check-blacklist.sh --- host/check-blacklist.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/check-blacklist.sh b/host/check-blacklist.sh index a00e018..0be8ad7 100755 --- a/host/check-blacklist.sh +++ b/host/check-blacklist.sh @@ -12,7 +12,7 @@ fi if ip=$(dig a "$1" +short) && [ -n "$ip" ] then - bl=$(dig a "$(printf "%s." "$ip" | tac -s.)$2" +short) \ + bl=$(dig a "$(printf "%s." "$ip" | tac -s.)$2" +short | grep -v "^;; ") \ && [ -n "$bl" ] && { echo "$ip is blacklisted ($bl)."; exit 1; } || echo "$ip is not blacklisted." else echo "Could not resolve $1!" -- 2.43.0