File: test2.py

package info (click to toggle)
python-dns 0.cvs%2B20020417-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 168 kB
  • ctags: 301
  • sloc: python: 1,339; makefile: 24; sh: 6
file content (17 lines) | stat: -rwxr-xr-x 368 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/opt/python/bin/python1.5

import sys ; sys.path.insert(0, '..')
import DNS
# automatically load nameserver(s) from /etc/resolv.conf
# (works on unix - on others, YMMV)
DNS.ParseResolvConf()

r=DNS.Request(qtype='mx')
res = r.req('connect.com.au')
res.show()

r=DNS.Request(qtype='soa')
res = r.req('connect.com.au')
res.show()

print DNS.revlookup('192.189.54.17')