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.

17 lines
476 B

#!/usr/bin/env python3
import DNSLG
import sys
resolver = DNSLG.Resolver.Resolver(["", ""], maximum=2)
for name in sys.argv[1:]:
result = resolver.query(name, "ANY")
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)