Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

extracting URLs and IPs from zonefiles - easily :-)

16 views
Skip to first unread message

ian diddams

unread,
Jun 3, 2012, 8:33:00 AM6/3/12
to
Hi all,

I have inhertited a couple of hundred zonefiles and have been tasked
with extracting ALL the URLs represented by them, and their IPs.
These zonefiles may also contain ORIGIN statements splitting out
subdomains, as well as CNAMES where I also need to list the "end" IP

I can script this all up no doubt, but before I reinvent the wheel has
anyone such a script already handy?

Or a link to a resource somewhere that ahs one - I have googled
already but haven;t found anything obvious.

There aren't necessarily reverse zones setup available - that would
have been far easier!

cheers

ian

chuckers

unread,
Jun 3, 2012, 7:28:27 PM6/3/12
to
On Sunday, June 3, 2012 9:33:00 PM UTC+9, ian diddams wrote:
> Hi all,
>
> I have inhertited a couple of hundred zonefiles and have been tasked
> with extracting ALL the URLs represented by them, and their IPs.
> These zonefiles may also contain ORIGIN statements splitting out
> subdomains, as well as CNAMES where I also need to list the "end" IP
>
> I can script this all up no doubt, but before I reinvent the wheel has
> anyone such a script already handy?
>
> Or a link to a resource somewhere that ahs one - I have googled
> already but haven;t found anything obvious.
>

Zonefiles? As in DNS zonefiles?

And you have to extract URLs from all of that?

I don't think you understand the task that has been given to you. I certainly don't understand what it is you are trying to do.

The zonefiles will contain hostnames etc. What does that have to do with URLs?

ian diddams

unread,
Jun 4, 2012, 4:41:25 AM6/4/12
to
On Jun 4, 12:28 am, chuckers <chucker...@gmail.com> wrote:
> The zonefile swill contain hostnames etc.  What does that have to do with URLs?

hostname plus domain served by the zone file = URL

eg

domain bert.com
zonefile bert.com
- .... www IN A 192.168.1.1

so the URL www.bert.com has IP 192.168.1.1

Its not a job I am excited about believe me :-)

I'm just trying to find a way to do this painlessly, and if somebody
out that perchance has done something similar and still has the script
or what ever they used I would be immensely grateful, rather than try
and reinvent the wheel.

I can assure you I DO understand the task that has been presented to
me - which is why I am seeking a painless solution.


cheers

ian

ian diddams

unread,
Jun 4, 2012, 5:21:07 AM6/4/12
to
(of course not all zonefiles "represent" URLs necessaarily I
appreciate - but in THESE cases they do!)

cheers

ian

ian diddams

unread,
Jun 4, 2012, 8:28:32 AM6/4/12
to
On Jun 4, 12:28 am, chuckers <chucker...@gmail.com> wrote:

> Thezonefileswill contain hostnames etc.  What does that have to do withURLs?

Put anotherw way if you prefer I need to extract the FQDN with IP from
every hostname in every zonefile.

ian

chuckers

unread,
Jun 4, 2012, 7:46:19 PM6/4/12
to
Does this help?:

https://sites.google.com/a/kluge.net/mkrdns/

Generate the reverse IP zonefile and then use awk to scarf up the FQDNs.

I make no promises that that will actually work.

ian diddams

unread,
Jun 5, 2012, 5:38:45 AM6/5/12
to
good call chuckers - many thanks for the pointer. i can give it a go
at least :-)

ian
0 new messages