Your IP : 18.226.187.224
3
���f& � @ sh d dl Z d dlZd dlZd dlmZmZ d dlmZmZ dZ G dd� d�Z
d
dd�Zd d
� Zdd� Z
dS )� N)�Popen�PIPE)�prefix�versionzdnssec-checkdsc @ sP e Zd Zddddd�ZdZdZdZdZdZdZ d Z
dd
d�Zdd
� Zdd� Z
dS )�SECRRzSHA-1zSHA-256ZGOSTzSHA-384)� � � � � �INNr c C s� |st �t|�tk r$|jd�j� }n|j� }t|�dk r<t �|r�d| _|j� | _|d j� j d�jd�}|j
� |jd�}|j
� xDt|�dkr�t|�dkr�|d |d kr�|dd � }|dd � }q�W |r�t �|j
� dj|�| _| jd | j d | _
nd| _|d j� | _
|dd � }|d j� dk�rJ|d j� | _|dd � }n(t|d �| _|d j� | _|dd � }|d j� | jk�r�t d|d j� | jf ��tt|dd
� �\| _| _| _dj|d
d � �j� | _d S )N�ascii� �DLVr �.r �DSr �CH�HSr z%s does not match %sr
r )r r r )� Exception�type�str�decode�split�len�rrtype�lower�dlvname�strip�reverse�join�parent�rrname�upper�rrclass�int�ttl�map�keyid�keyalg�hashalg�digest)�selfZrrtextr Zfieldsr �dlv� r- �/usr/lib/python3.6/checkds.py�__init__$ sH
*zSECRR.__init__c C s$ d| j | j| j| j| j| j| jf S )Nz%s %s %s %d %d %d %s)r! r# r r'