sunadmn has asked for the wisdom of the Perl Monks concerning the following question:

Hello all!!

I am trying to find out if there are any other good DNS zone parsers out there other than DNS::ZoneParse. The reason being is I need to parse a ton of in-addr records for their data, but alot of them do not have a standard IP -> NAME conversion I have used instead the $GENERATE statement and this PM will not grab all the data. Any help you all may offer would be awsome.

_SunAdmn

Edit by tye, title, P tags

Replies are listed 'Best First'.
Re: Alternative to DNS::ZoneParse ?
by naChoZ (Curate) on Jul 18, 2003 at 19:47 UTC
    I've tried Unix::Conf::Bind8 with success. Here's just a silly snippet I was fooling around with that prints the file name of a zone.

    #!/usr/bin/perl -w use strict; use Unix::Conf::Bind8; my $namedconf='/path/to/named.conf'; my ($obj, $conf); $conf = Unix::Conf::Bind8->new_conf ( FILE => $namedconf, SECURE_OPEN => 0 ) or $conf->die ('could not open \'named.conf\':' . $!); $obj = $conf->get_zone ('example.com') or $obj->die ("couldn't get zone `example.com'"); print "\n" . $obj->file . "\n";

    Data::Dumper will reveal the rest of the zone for you.

    ~~
    naChoZ

Re: Alternative to DNS::ZoneParse ?
by Anonymous Monk on Jul 19, 2003 at 03:19 UTC