Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- fn = sys.argv[1]
- print("""
- ;
- ; BIND RPZ
- ;
- $TTL 3600
- @ IN SOA mvps.rpz.zone. mvps.rpz.zone. (
- 2 ; Serial
- 604800 ; Refresh
- 86400 ; Retry
- 2419200 ; Expire
- 604800 ) ; Negative Cache TTL
- ;
- @ IN NS localhost.
- """)
- for line in open(fn, 'r'):
- p = line.find('#')
- line = line[:p].strip()
- if line:
- parts = line.split(' ')
- host = parts[1]
- if host != "localhost":
- print("{:52s} CNAME .".format(host))
- print("*.{:50s} CNAME .".format(host))
Advertisement
Add Comment
Please, Sign In to add comment