"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "scandns-0.1/README" of archive scandns-0.1.tar.gz:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 
    2 This script should be pretty straightforward. Feed it a network (ip
    3 address/CIDR or ip address/netmask ) and it scans the dns records of said 
    4 network, reporting theresults to STDOUT. Neat. 
    5 
    6 Rather than reinvent the wheel, I cheated and used Net::Netmask. Eventually
    7 I'll write a sub to handle slash/netmask notation, but until then this program
    8 requires the forementioned module, which is available from cpan and also
    9 included in the tarball. To install Net-Netmask, untar/unzip the archive and 
   10 run 'perl -e Makefile.pl' in the archive's directory.
   11 
   12 Here's some example output (and no, none of these machines are publicly
   13 routable, so don't even think about it):
   14 
   15 
   16 nooky:~$ ./scandns.pl 10.0.0.0/24
   17 <----snip---->
   18 10.0.0.202 => beauty.zacknetwork.com => 10.0.3.101 
   19 10.0.0.203 => tman.zacknetwork.com => 10.0.3.15 
   20 10.0.0.204 => afterglow.zacknetwork.com 
   21 10.0.0.205 => serenity.zacknetwork.com => 10.0.7.10 
   22 10.0.0.206 => girth.zacknetwork.com => girth.zacknetwork.com has no A record
   23 10.0.0.207 => no PTR record
   24 <----snip---->
   25 
   26 
   27 Note that afterglow's A and PTR records matched. Ideally there shouldn't be
   28 anthing in the third column. If there is, then your forward/inverse records
   29 aren't getting along very well.
   30 
   31 TODO:
   32 
   33 1) command line options to filter the output (ie, "scandns.pl --no-reverse"
   34    would only show ip's with no reverse, etc).
   35 2) write subs to handle other network descriptions (Net::Netmask will take
   36    many more forms of notation than this program will). As it stands right
   37    now, the following are equivalent (and will work):
   38 
   39 	10.0.0.0/24
   40 	10.0.0.0/255.255.255.0
   41 	10.0.0.0:255.255.255.0
   42 
   43 3) Snarf the useful code out of Net::Netmask so that one need not install
   44    the module for seuccesful execution of this program.
   45 4) Have scan dns do a zone transfer on a given domain and scan by hostname
   46    rather than by ip address. 
   47 
   48 questions/comments/flames : jon@divisionbyzero.com 
   49 
   50 Last Updated: 6.19.00 16:27:54
   51