4 ms·
Dnsdiff
- dwb 12y agoNice work. It would be even better if the author packaged it properly so the dependency is installed along with it :) Ruby projects are always gems, Haskell projects always have a Cabal definition, and Node projects are always available in NPM – but so often I see Python scripts or libraries that don't have a setup.py and friends. The state of Python packaging is a bit of a mess still, granted, but it's not difficult. The guide is here: https://packaging.python.org/ https://packaging.python.org/
- pcthrowaway 12y agocan someone explain how this provides an advantage over using dig and diff?
- acdha 12y agoCheck out the logic: https://github.com/joshenders/dnsdiff/blob/master/dnsdiff#L135 https://github.com/joshenders/dnsdiff/blob/master/dnsdiff#L1... If you use dig and a text diff, you'll see more noise for lines which have been reordered, omitted, etc. This approach provides better output, making it easier to read and decreasing the odds of operator error – which is always a good thing but particularly so for something as important as DNS.
- verelo 12y agoHaving worked in the hosting industry on many migration projects, my experience is that tools like this get scripted up from scratch far too often, resulting in bugs and many other issues that should never have existed. Thanks for sharing this! One question that springs to mind: does this handle round robin DNS entries? With things like Alias records at Amazon becoming more common, and other pre-existing round robin setups out there, i could see those being important to consider. I would test it myself now but i need to hit bed for the night :-) If no one answers i'll post the answer when I get to test it out.
- chair6 12y ago> .. scripted up from scratch far too often .. Heh .. no way! :) https://gist.github.com/chair6/1748a6676120a0aacea2 https://gist.github.com/chair6/1748a6676120a0aacea2
- joshenders 12y agoIt should handle round robin DNS entries just fine but happy to update it if you find an issue.
- joshenders 12y agoI spoke too soon, I'll have an update shortly that addresses this and a few other issues I've noticed. Thanks for the feedback!
- jbn 12y agoIt's a little odd to write: if color_enabled: print(added(r2.answer, color=True)) else: print(added(r2.answer)) wouldn't you rather write: print(added(r2.answer, color=color_enabled)) after adjusting color_enabled to be None or True?
- _lce0 12y agobonus: make `printAdded(answer, color)` and avoid creating the strings and returning them just to be printed great project btw!
- joshenders 12y agoYeah, I end up doing essentially this in the most recent version.
- _paulc 12y agoIf you have dnslib installed (https://pypi.python.org/pypi/dnslib https://pypi.python.org/pypi/dnslib) you can also do something like: python3.4 -m dnslib.client --server <ns1> --diff <ns2> <domain> <type>
- joshenders 12y agoNice!
- fanf2 12y agoSee also http://dotat.at/prog/nsdiff/ http://dotat.at/prog/nsdiff/ which outputs the differences between two versions of a zone as an bs update script. We use it at Cambridge University for pushing changes from our IP Register database into the DNSSEC signing server.