File: testsrv.py

package info (click to toggle)
python-dns 2.3.0-5.2%2Betch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 184 kB
  • ctags: 316
  • sloc: python: 1,391; makefile: 7
file content (13 lines) | stat: -rw-r--r-- 290 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/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='srv')
res = r.req('_ldap._tcp.openldap.org')
res.show()
print res.answers