Results 1 to 8 of 8
Thread: DNS File Parsing
-
03-02-2001, 06:58 AM #1Web Hosting Guru
- Join Date
- Mar 2001
- Location
- London, England
- Posts
- 335
Hi All,
Does anyone know where i can get hold of some scripts to parse DNS files?
Basically, i need to parse the contents of thousands of DNS files in order to put them into a database and i really don't want to do it manually.
Hope someone can help.
Thanks in advance
Mark
-
03-02-2001, 12:46 PM #2Newbie
- Join Date
- Mar 2001
- Posts
- 16
Im looking for one too...
-
03-04-2001, 04:44 AM #3Aspiring Evangelist
- Join Date
- Feb 2001
- Location
- New York City
- Posts
- 385
I'd be happy to help anyone who needs this.
Email me off the list and I'll give you what we have.
It simply goes through each zone file, gets the IP for the www IN record and correlates the two.
Raj Dutt // CEO // Voxel dot Net Inc
http://www.voxel.net // sales@voxel.net
-
03-04-2001, 05:26 PM #4NOC DOC :)
- Join Date
- Feb 2001
- Location
- USA
- Posts
- 866
i'll send an email right away :) thamks
elijaH
-
03-07-2001, 08:37 AM #5Web Hosting Guru
- Join Date
- Mar 2001
- Location
- London, England
- Posts
- 335
DNS File Parsing
Hi All,
Many thanks for the replies (especially Raj - i'll be contacting you).
After i had posted this message, we went away and wrote a perl module to parse zone files and produce XML (or any other) output. We'll be posting this on CPAN soon, but if anyone would like a copy, please let me know.
Thanks - Mark Castle
-
03-07-2001, 10:41 AM #6WHT Addict
- Join Date
- Dec 2000
- Location
- Scotland
- Posts
- 134
I would also like a look if possible, Im currently trying to import 3500 zone files into a mysql database and its a little awkward.
(E-Mail is tony@xcalibre.co.uk)
Regards,
Tony LucasFounder & SVP Product
Flexiant Ltd
Simplifying the Cloud - Designed for Service Providers
http://www.flexiant.com
-
04-15-2001, 04:22 PM #7Web Hosting Master
- Join Date
- Apr 2001
- Location
- Denmark, Europe
- Posts
- 614
I needed to import a large amount of zones into a SQL database too - last year. So I wrote some Perl code to do it -- no problem. But later I found the _correct_ solution (which I am now using).
It's both easier, fast and more correct than using Perl :-)
Simply try downloading the bind sources, and you will find there's a set of support functions for reading in and parsing zone files - returning them as a set of RR records in a node (easy to program with).
With the new Bind9 there's even an example program that imports zone files into a PostgreSQL database. It was very easy to edit that into importing in a MySQL database.
--
Jens Kristian Søgaard, Mermaid Consulting I/S,
jens@mermaidconsulting.dk,
http://www.mermaidconsulting.com/Last edited by jks; 04-15-2001 at 04:28 PM.
-
04-17-2001, 07:14 AM #8Web Hosting Guru
- Join Date
- Mar 2001
- Location
- London, England
- Posts
- 335
Hi Jens,
Many thanks for the TIP.
You may be interested to know that we went away and wrote a Perl module that parses Zone Files also; It is available to download from CPAN. My colleague Simon Flack took the bare bones of what we needed and wrapped it up as a rather useful utility.
http://search.cpan.org/search?dist=DNS-ZoneParse
It also produces XML output.
Best Regards
Mark Castle