Skip to content

Instantly share code, notes, and snippets.


jpmens/ Secret

Last active October 21, 2020 12:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Generate catalog zone PTR records
# Jan-Piet Mens, 2020-OCT-21
import # pip install dnspython
import hashlib
import sys
if __name__ == '__main__':
if len(sys.argv) < 2:
print("Usage: {0} domain-name [domain-name ..]".format(sys.argv[0]), file=sys.stderr)
for domain in sys.argv[1:]:
fqdn =
h = hashlib.sha1(
print("{0}.zones\t\tPTR {1}".format(h, fqdn))
Copy link

jpmens commented Oct 21, 2020

c5e4b4da1e5a620ddaa3635e55c3732a5b49c7f4.zones          PTR
47ac1a4d93b61fffdb4762c18c9e7d1a6b046d33.zones          PTR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment