ldns base 1.6.9 from tarball

This commit is contained in:
Jeff Lenk
2011-03-25 11:23:32 -05:00
parent d09f96d44f
commit 579927b53a
240 changed files with 115445 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#!/usr/bin/python
#
# MX is a small program that prints out the mx records for a particular domain
#
import ldns
resolver = ldns.ldns_resolver.new_frm_file("/etc/resolv.conf")
pkt = resolver.query("nic.cz", ldns.LDNS_RR_TYPE_MX,ldns.LDNS_RR_CLASS_IN)
if (pkt):
mx = pkt.rr_list_by_type(ldns.LDNS_RR_TYPE_MX, ldns.LDNS_SECTION_ANSWER)
if (mx):
mx.sort()
print mx