Add dns.py - taken from https://github.com/nathanblaney/Walter