Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 21 lines (17 sloc) 0.448 kB
#!/bin/bash
address=$1
domain=`echo $address | sed -r "s/^(.+\/\/)([^/]+)(.*)/\2/"`
input=`cat name-servers.txt`
auth=0
for nameserver in $input; do
query=`nslookup -timeout=1 $domain $nameserver`
not_authoritative=`echo $query | grep -i -E "(Non-authoritative answer|server can't find|connection timed out)" | wc -l | sed 's/ //g'`
if [ $not_authoritative == 0 ]; then
(( auth++ ))
fi
done
if [ $auth == 0 ]; then
echo 0
else
echo 1
fi
Jump to Line
Something went wrong with that request. Please try again.