bug fixes
This commit is contained in:
parent
2224e3b563
commit
4b293167e9
1 changed files with 1 additions and 2 deletions
3
main.py
3
main.py
|
@ -241,14 +241,13 @@ def write_dns_reverse_file(api_client):
|
|||
mx_records=mx_records,
|
||||
ptr_records = ptr_records)
|
||||
|
||||
filename = 'dns.{zone}zone'.format(zone=zone_name)
|
||||
filename = 'dns.{zone}.zone'.format(zone=zone_name)
|
||||
with open(filename, 'w+') as f:
|
||||
f.write(zone_file_content)
|
||||
|
||||
|
||||
### Continue with the ipv6 reverse
|
||||
net = netaddr.IPNetwork(zone['prefix_v6']+"/"+str(zone['prefix_v6_length']))
|
||||
print(net)
|
||||
net_class = max(((net.prefixlen - 1) // 4) + 1, 1)
|
||||
zone6_name = ".".join(
|
||||
netaddr.IPAddress(net.first).reverse_dns.split('.')[32 - net_class:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue