Does anyone know of a simple script that will go through a list of BIND primary files, or more and output a list of output like this:
secondlevel.domain --> address thirdlevel.secondlevel.domain --> address
and so on for several thousand domain files.
We acquired a company that never kept their reverses up to date and need a simple way of building them to keep track of their IP utilizations.
There is probably one written in perl out there somewhere, I'd appreciate a pointer.
it would probably be easy enough to throw one together, however, i'd suggest sucking all the zones directly out of bind via axfr instead of reading the zone files directly. that "normalizes" the output to something you can pass through grep rather easily. ex: % dig example.com axfr @192.168.189.7 | grep '\<IN.A\>' home 5M IN A 192.168.189.65 localhost 1D IN A 127.0.0.1 www 5M IN A 192.168.189.72 wombat 5M IN A 192.168.189.65 % from there it's only a short hop to reversing the information. -- |-----< "CODE WARRIOR" >-----| codewarrior@daemon.org * "ah! i see you have the internet twofsonet@graffiti.com (Andrew Brown) that goes *ping*!" andrew@crossbar.com * "information is power -- share the wealth."