# Path: dns/utils.py
# def status_name(status):
#     """
#     >>> import adns
#     >>> status_name(adns.status.nxdomain)
#     'nxdomain'
#     """
#     import adns
#     return {
#         adns.status.ok: 'ok',
#         adns.status.nomemory: 'nomemory',
#         adns.status.unknownrrtype: 'unknownrrtype',
#         adns.status.systemfail: 'systemfail',
#         adns.status.timeout: 'timeout',
#         adns.status.allservfail: 'allservfail',
#         adns.status.norecurse: 'norecurse',
#         adns.status.invalidresponse: 'invalidresponse',
#         adns.status.unknownformat: 'unknownformat',
#         adns.status.rcodeservfail: 'rcodeservfail',
#         adns.status.rcodeformaterror: 'rcodeformaterror',
#         adns.status.rcodenotimplemented: 'rcodenotimplemented',
#         adns.status.rcoderefused: 'rcoderefused',
#         adns.status.rcodeunknown: 'rcodeunknown',
#         adns.status.inconsistent: 'inconsistent',
#         adns.status.prohibitedcname: 'prohibitedcname',
#         adns.status.answerdomaininvalid: 'answerdomaininvalid',
#         adns.status.invaliddata: 'invaliddata',
#         adns.status.querydomainwrong: 'querydomainwrong',
#         adns.status.querydomaininvalid: 'querydomaininvalid',
#         adns.status.querydomaintoolong: 'querydomaintoolong',
#         adns.status.nxdomain: 'nxdomain',
#         adns.status.nodata: 'nodata',
#         }.get(status, str(status))


import sys
import adns
import ADNS
from hashlib import md5
from dns.utils import status_name
#!/usr/bin/env python


sys.path.append('.')


def callback(answer, name, rr, flags, data):
    print name, data, status_name(answer[0])
    for entry in answer[3]:
        if data == 'SOA':
            print '   ', entry[0]
        else:

# Path: dns/utils.py
# def status_name(status):
#     """
#     >>> import adns
#     >>> status_name(adns.status.nxdomain)
#     'nxdomain'
#     """
#     import adns
#     return {
#         adns.status.ok: 'ok',
#         adns.status.nomemory: 'nomemory',
#         adns.status.unknownrrtype: 'unknownrrtype',
#         adns.status.systemfail: 'systemfail',
#         adns.status.timeout: 'timeout',
#         adns.status.allservfail: 'allservfail',
#         adns.status.norecurse: 'norecurse',
#         adns.status.invalidresponse: 'invalidresponse',
#         adns.status.unknownformat: 'unknownformat',
#         adns.status.rcodeservfail: 'rcodeservfail',
#         adns.status.rcodeformaterror: 'rcodeformaterror',
#         adns.status.rcodenotimplemented: 'rcodenotimplemented',
#         adns.status.rcoderefused: 'rcoderefused',
#         adns.status.rcodeunknown: 'rcodeunknown',
#         adns.status.inconsistent: 'inconsistent',
#         adns.status.prohibitedcname: 'prohibitedcname',
#         adns.status.answerdomaininvalid: 'answerdomaininvalid',
#         adns.status.invaliddata: 'invaliddata',
#         adns.status.querydomainwrong: 'querydomainwrong',
#         adns.status.querydomaininvalid: 'querydomaininvalid',
#         adns.status.querydomaintoolong: 'querydomaintoolong',
#         adns.status.nxdomain: 'nxdomain',
#         adns.status.nodata: 'nodata',
#         }.get(status, str(status))


# Path: tools/test_adns.py
import sys
import adns
import ADNS
from hashlib import md5
from dns.utils import status_name

#!/usr/bin/env python


sys.path.append('.')


def callback(answer, name, rr, flags, data):
    print name, data, status_name(answer[0])
    for entry in answer[3]:
        if data == 'SOA':
            print '   ', entry[0]
        else:

            print '   ', entry