From dfb3d0f9df9cdfe1589e871eff19b467a700ca7b Mon Sep 17 00:00:00 2001 From: opi Date: Tue, 26 Apr 2016 11:04:27 +0200 Subject: [PATCH] [enh] Use separate file so store master key. --- .gitignore | 3 +++ dynette.cron.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 17e6738..78be43a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ *.swp +# Master Key +master.key + # Thin server files log/* tmp/* \ No newline at end of file diff --git a/dynette.cron.py b/dynette.cron.py index 7c35344..3421381 100755 --- a/dynette.cron.py +++ b/dynette.cron.py @@ -8,7 +8,6 @@ subs_urls = ['http://dyndns.yunohost.org'] # 127.0.0.1 if you install subscribe ns0 = 'ns0.yunohost.org' # Name servers ns1 = 'ns1.yunohost.org' rname = 'hostmaster@yunohost.org' # Responsible person (https://tools.ietf.org/html/rfc1035#section-3.3.13) -master_key= 'abcdef123456' allowed_operations = { '.' : ['A', 'AAAA', 'TXT', 'MX'], @@ -30,6 +29,7 @@ from urllib import urlopen lines = ['// Generated by Dynette CRON'] for url in subs_urls: + master_key = open('./master.key').read().rstrip(); lines.extend([ 'key dynette. {', ' algorithm hmac-md5;',