A simple demonstation program. Don't run it for too long
as we don't really want to beat on WIDE's servers.
Mark
#!/bin/sh
qname=1.0.0.2.ip6.arpa
depth=4
try() {
local newqname
local oldqname
local l
oldqname=$qname
for l in 0 1 2 3 4 5 6 7 8 9 a b c d e f
do
newqname=$l.$oldqname
echo trying $newqname
dig +noques ptr $newqname > /tmp/$$xxx
grep PTR /tmp/$$xxx
if grep NOERROR /tmp/$$xxx > /dev/null
then
qname=$newqname
if test $depth -lt 31
then
depth=`expr $depth + 1`
try
depth=`expr $depth - 1`
fi
fi
done
qname=$oldqname
}
try