Quick and easy sanity checks…
My requirement was to test 500 A/PTR records. The client didn’t feel comfortable with bulk loading the records, so the work had been split up to be manually added between multiple resources – I was concerned, and didn’t have much time to find the errors.
Process followed:
- Save a file containing all your IP’s
- Save a file containing all FQDNs
- Run the following from windows cmd:
FOR /F %i in (txt) DO nslookup %i >> resolutions-ip.txt 2>> failures-ip.txt
FOR /F %i in (.txt) DO nslookup %i >> resolutions-fqdn.txt 2>> failures-fqdn.txt
- Go have coffee and think how clever you are
- Realize that this could actually be scripted properly in Python and realize how clever you aren’t
This quickly gave me a great list of missed records from STDERR. The duplicates and mismatched records were confirmed with some regex magic in notepad++ on the STDOUT output.
3mins work for pretty good yield, but if it’s a repetitive task (it wasn’t for me… yet…), script it properly!