Results 1 to 8 of 8
  1. #1
    Join Date
    Mar 2001
    Location
    London, England
    Posts
    335

    Smile

    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

  2. #2

    Smile

    Im looking for one too...


  3. #3
    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

  4. #4
    Join Date
    Feb 2001
    Location
    USA
    Posts
    866
    i'll send an email right away :) thamks

    elijaH

  5. #5
    Join Date
    Mar 2001
    Location
    London, England
    Posts
    335

    Thumbs up 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



  6. #6
    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 Lucas
    Founder & SVP Product
    Flexiant Ltd
    Simplifying the Cloud - Designed for Service Providers
    http://www.flexiant.com

  7. #7
    Join Date
    Apr 2001
    Location
    Denmark, Europe
    Posts
    614

    Wink

    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.

  8. #8
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •