[net-dns-users] Parsing MS DNS zone files
Dick Franks
rwfranks at acm.org
Mon Oct 27 06:49:42 UTC 2014
Simply handle the exception:
use Net::DNS::ZoneFile;
my $zonefile = new Net::DNS::ZoneFile($filename);
while ( my $rr = eval{ $zonefile->read } || $@ ) {
print($@) && next if $@;
$rr->print; # or whatever
}
At the moment you get the full confession. I will tone it down in next
revision.
Dick Franks
________________________
On 27 October 2014 04:02, Chris Buxton <clists at buxtonfamily.us> wrote:
> Hi,
>
> I'm trying to parse MS DNS zone files using Net::DNS::Zonefile, but it's
> having issues with two non-standard Microsoft additions to the format:
>
> 1. Age values. For example:
>
> _kerberos._tcp.direktion._sites.dc._msdcs [AGE:3627351] 600 SRV 0
> 100 88 atzt0009.at.zurich.com.
>
> 2. WINS records. For example:
>
> @ 0 WINS L2 C900 (
> 192.168.47.221
> 192.168.47.222 )
>
> I don't actually need these data points. I just need to have
> Net::DNS::ZoneFile::read not fail (return null) when encountering them. I
> have a lot of this data, such that it would be painful to rely on manual
> remediation. Does anyone have any ideas?
>
> Thanks,
> Chris Buxton
>
> _______________________________________________
> net-dns-users mailing list
> net-dns-users at nlnetlabs.nl
> https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/net-dns-users/attachments/20141027/c9250701/attachment.htm>
More information about the net-dns-users
mailing list