#!/bin/bash
dig . DNSKEY | grep -Ev '^($|;)' > root.keys
while read line
do
if dig +sigchase +trusted-key=root.keys $line. A @8.8.8.8 | grep --quiet "DNSSEC validation is ok: SUCC"; then
echo $line
fi
done < $1
Click to Open Code Editor