You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
466 B

import DNSLG
import sys
resolver = DNSLG.Resolver.Resolver(["", ""], maximum=2)
for name in sys.argv[1:]:
result = resolver.query(name, "ANY")
print result.answer
print "From %s: " % result.nameserver
rrsets = result.answer # There is also additional, authority, etc
for rrset in rrsets:
print "%s/%s ->" % (, rrset.rdtype)
for rr in rrset:
print "\t%s" % rr
print ""