Revision [427]

This is an old revision of dotNullStatus made by AvoYager on 2007-07-15 17:13:41.

 



Tue Mar 18 01:54:36 EDT 2008
null is mastered by ns21.opennic.glue. 58.6.115.46 datestamped ns1.opennic.glue.

Responding Hosts

Sun Jul 31 05:43:47 UTC 2011

All Hosts

Sun Jul 31 05:43:32 UTC 2011

The Script

#!/bin/bash
# file: audit.sh
# Modifications
# avo 20 Sep 2007 (Original author)
# BrianKoontz 01Jun2009 (Modified zone list)

#zone_list=`dig +norecurse +short tlds.opennic.glue txt |sed s/\"//g |cut -d" " -f3-`
#zone_list=${zone_list//fur/}
#zone_list=${zone_list//oss/}
#zone=
zone="opennic.glue bbs free fur geek indy ing null oss parody gopher"
zone_list=${zone}


############################
audit () {
test -e ${outfile}.log && mv -f ${outfile}.log ${outfile}.last
date >${outfile}.log

for each in `dig axfr ${zone} @58.6.115.46 |grep IN |cut -f1 |sort |uniq`
do echo "$each `host -W1 -ta $each`" |head -1 >> ${outfile}.log
done
test -e ${outfile}.last && diff ${outfile}.last ${outfile}.log > ${outfile}.diff
}
############################
summarize () {
sumfile=${zone}-summary
test -e ${sumfile}.log && mv -f ${sumfile}.log ${sumfile}.last

date >${sumfile}.log
grep "\.${zone}\..*has address" ${outfile}.log |cut -d " " -f 2-5 |sort >> ${sumfile}.log
grep "\.${zone}\..*has address" ${outfile}.log |sed s/^.*address.// |sort |uniq > ips.log

for each in `cat ips.log`
do
echo -n "$each ping:" >> ${sumfile}.log
if ping -c1 -q -W1 $each >/dev/null
then echo yes >> ${sumfile}.log
else echo no >> ${sumfile}.log
fi
done
rm ips.log
test -e ${sumfile}.last && diff ${sumfile}.last ${sumfile}.log > ${sumfile}.diff
}
############################
sumfails () {
failfile=${zone}-fail
date >${failfile}.log
grep "\(timed out\)\|\(SERVFAIL\)" ${outfile}.log |sort > ${failfile}.log
}
############################
build_links () {
linkfile=${zone}-links.html
droplist="ns mail dns. localhost"
passes () {
for each in $droplist
do expr "$link" : "$each" >/dev/null && return 1
done
return 0
}
linklist=`grep " has address " ${zone}-summary.log | cut -d" " -f1`
dstamp=`date`
cat >$linkfile

$zone links


${dstamp}

required: www.opennic.${zone}

EOF
for link in $linklist
do
if passes $link
then echo " $link " >>$linkfile
fi
done
cat >>$linkfile

CNAMEs not shown


EOF
}
############################
for zone in $zone_list
do \
outfile=${zone}-audit
audit
summarize
sumfails
build_links
done
exit 0


CategoryAuditing
CategoryHostmastering
There are no comments on this page.
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki