ascension

Migrate DNS zones to the GNU Name System
Log | Files | Refs | README | LICENSE

commit 677b7f5f62176f3322c805d373b88eaa9ecfed42
parent 5e99d6901e622deef1789c9a84862a839bfb6ffc
Author: rexxnor <rexxnor+gnunet@brief.li>
Date:   Thu, 17 Jan 2019 19:18:35 +0100

added dnscurve detection and log it, fix ttl bug with hierarchy

Diffstat:
Mascension/ascension.py | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ascension/ascension.py b/ascension/ascension.py @@ -30,6 +30,7 @@ import dns.query import dns.resolver import dns.zone import docopt +import daemon from daemonize import Daemonize # GLOBALS @@ -175,7 +176,7 @@ class Ascender(): if len(subzones) == 2 and subzones[0][0] == "_": pass elif len(subzones) > 1: - ttl = cls.get_zone_refresh_time() + ttl = cls.soa[1] cls.create_zone_hierarchy(subzones, ttl) label = subzones[0] subdomains = ".".join(subzones[1:]) @@ -301,6 +302,11 @@ class Ascender(): value = value[:-1] elif rdtype == 'NS': nameserver = str(record) + if nameserver[0:2] == 'uz5': + logging.info("zone has a dnscurve record") + # TODO extract public key from NS record (dnscurve) + #encoded_pkey = nameserver[2:].split('.')[0] + #pkey = if value[-1] == ".": value = value[:-1] else: @@ -522,7 +528,7 @@ class Ascender(): pkey_lookup = sp.Popen([GNUNET_ZONE_CREATION_COMMAND, '-d'], stdout=sp.PIPE) - pkey_line = sp.Popen(['grep', zonestring], + pkey_line = sp.Popen(['grep', '^' + zonestring], stdin=pkey_lookup.stdout, stdout=sp.PIPE) pkey_zone = sp.check_output(['cut', '-d',