From ea3643b0e993e510a3088912dbb4dff81ad46dd1 Mon Sep 17 00:00:00 2001 From: tgroman <> Date: Mon, 26 Jun 2017 09:25:08 -0700 Subject: added chkdns.sh --- chkdns.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 chkdns.sh diff --git a/chkdns.sh b/chkdns.sh new file mode 100755 index 0000000..0b6973d --- /dev/null +++ b/chkdns.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +#start definefine nameservers + +NS1=dns1.yourdomain.com +NS2=dns2.yourdomain.com +NS3=dns1.yourlegacydomain.com +NS4=dns2.yourlegacydomain.com + +function findNameServer { + whois $currentdn | grep 'Name\ Server' | sed 's/^ *//' | sort -u +} + + + + +cat domains.lst | sort | uniq | while IFS= read -r currentdn ; do + currentns=$(findNameServer) + + + if `echo ${currentns} | grep -E "{$NS1|$NS2|$NS3|$NS4}" 1>/dev/null 2>&1` + then + #echo "DEBUG: FOUND" + echo "$currentdn" + else + echo "DEBUG: NOT Found" >/dev/null + fi + + #echo $currentdn + #echo $currentns + +done -- cgit v1.2.3