Browse Source

verbose resolver

master
Paolo Asperti 8 months ago
parent
commit
2330ab1a7f
Signed by: paspo
GPG Key ID: 06D46905D19D5182
  1. 11
      resolve.sh

11
resolve.sh

@ -10,4 +10,13 @@ outfile=${1}.resolved
DNSSERVER=9.9.9.9
cat "$infile" | xargs -n 1 dig @${DNSSERVER} +short | grep -v '\.$' | sort -u > ${outfile}
echo > ${outfile}.tmp
cat "$infile" | while read LINE ; do
echo "resolving: $LINE"
IP=$(dig @${DNSSERVER} +short "$LINE" | grep -v '\.$')
echo "$IP"
echo "$IP" >> ${outfile}.tmp
echo
done
cat ${outfile}.tmp | grep -v ^$ | sort -u > ${outfile}
rm ${outfile}.tmp

Loading…
Cancel
Save