AlkantarClanX12
Current Path : /proc/self/root/lib/python3.6/site-packages/isc/__pycache__/ |
Current File : //proc/self/root/lib/python3.6/site-packages/isc/__pycache__/keyzone.cpython-36.pyc |
3 ���f� � @ sJ d dl Z d dlZd dlZd dlmZmZ G dd� de�ZG dd� d�ZdS )� N)�Popen�PIPEc @ s e Zd ZdS )�KeyZoneExceptionN)�__name__� __module__�__qualname__� r r �/usr/lib/python3.6/keyzone.pyr s r c @ s e Zd ZdZdd� ZdS )�keyzonez/reads a zone file to find data relevant to keysc C s� d | _ d | _|sd S | s8tjj|� s8tj|tj� rDtd��d S d }}t|dd||gt t d�j � \}}xv|j� D ]j}t|�t k r�|jd�}tjd|�r�qv|j� } | s�t| d �|kr�t| d �}| d d krvt| d �}qvW || _|| _ d S ) Nz"named-compilezone" not foundz-o�-)�stdout�stderr�asciiz^[:space:]*;� � ZDNSKEY)�maxttl�keyttl�os�path�isfile�access�X_OKr r r Zcommunicate� splitlines�type�str�decode�re�search�split�int) �self�name�filenameZczpathr r �fp�_�lineZfieldsr r r �__init__ s. zkeyzone.__init__N)r r r �__doc__r&