count fails
This commit is contained in:
parent
afbed48118
commit
202093d693
@ -14,14 +14,14 @@ fi
|
|||||||
IPS="$(dig +short $1 A | sort -u) $(dig +short $1 AAAA | sort -u)"
|
IPS="$(dig +short $1 A | sort -u) $(dig +short $1 AAAA | sort -u)"
|
||||||
|
|
||||||
# Loop through IPs
|
# Loop through IPs
|
||||||
|
fails=0
|
||||||
for IP in $IPS; do
|
for IP in $IPS; do
|
||||||
# Performs the actual lookup against blacklists
|
# Performs the actual lookup against blacklists
|
||||||
RESULT=$(host $IP | rev | cut -d" " -f1 | rev | sed 's/.$//')
|
RESULT=$(host $IP | rev | cut -d" " -f1 | rev | sed 's/.$//')
|
||||||
if [ "$RESULT" != "$1" ]; then
|
if [ "$RESULT" != "$1" ]; then
|
||||||
echo 1
|
((fails++))
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo 0
|
echo $fails
|
||||||
exit 0
|
exit 0
|
Loading…
Reference in New Issue
Block a user