You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the code only handles if the PTR zone is 255.255.255.0. That should be fine for Census but I think to make the code more complete, it should also be able to handle /16.
The text was updated successfully, but these errors were encountered:
In DNS, the zones for IPv4 are created only for /24 boundaries. You can get this from the ipaddress python module
importipaddressip=ipaddress.ip_address(ip_address_string)
rev_ip=ip.reverse_pointerv=ip.versionifv==4:
np='.'.join(p.split('.')[1:])
elifv==6:
np='.'.join(p.split('.')[16:])
else:
np='undefined'# np is the string for the PTR zone, either ipv4 format (/24) or ipv6 format (/64).
We do want to make sure we can extend this for IPv6 easily.
Currently the code only handles if the PTR zone is 255.255.255.0. That should be fine for Census but I think to make the code more complete, it should also be able to handle /16.
The text was updated successfully, but these errors were encountered: