File: ldns-zone.py

package info (click to toggle)
ldns 1.8.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,864 kB
  • sloc: ansic: 46,986; python: 7,675; sh: 4,229; perl: 2,186; makefile: 1,231; xml: 518
file content (15 lines) | stat: -rwxr-xr-x 260 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python
import ldns

#Read zone from file
zone = ldns.ldns_zone.new_frm_fp(open("zone.txt","r"), None, 0, ldns.LDNS_RR_CLASS_IN)
print zone

print "SOA:", zone.soa()
for r in zone.rrs().rrs():
   print "RR:", r


zone = ldns.ldns_zone()
#print zone