shell bypass 403

Cubjrnet7 Shell


name : checkds.cpython-39.pyc
a

G@�h�@sfddlZddlZddlZddlmZmZddlmZmZdZ	Gdd�d�Z
dd�Zd	d
�Zdd�Z
dS)
�N)�Popen�PIPE)�prefix�versionzdnssec-checkdsc@sNeZdZddddd�ZdZdZdZdZdZdZ	d	Z
d
d�Zdd
�Zdd�Z
dS)�SECRRzSHA-1zSHA-256ZGOSTzSHA-384)������INNrcCs|st�t|�tur$|�d���}n|��}t|�dkr<t�d|_|d��|_|dd�}|d�	�dvr�|d�	�|_
|dd�}n(t|d�|_|d�	�|_
|dd�}|d�	�|jkr�td|d�	�|jf��t
t|dd	��\|_|_|_d
�|d	d���	�|_dS)N�ascii�ZDSrr)rZCHZHSrz%s does not match %sr
r)�	Exception�type�str�decode�split�len�rrtype�lower�rrname�upper�rrclass�int�ttl�map�keyid�keyalg�hashalg�join�digest)�selfZrrtext�fields�r$�//usr/lib/python3.9/site-packages/isc/checkds.py�__init__$s,�zSECRR.__init__cCs$d|j|j|j|j|j|j|jfS)Nz%s %s %s %d %d %d %s)rrrrrrr!)r"r$r$r%�__repr__Cs
��zSECRR.__repr__cCs|��|��kS�N)r')r"�otherr$r$r%�__eq__HszSECRR.__eq__)�__name__�
__module__�__qualname__�hashalgsrrrrrr!rr&r'r*r$r$r$r%rsrc	CsDg}|jrt|j���}n(|jddddd|g}t|td���\}}|��D](}t|�t	urd|�
d�}|�t|��qJt
|dd	�d
�}g}|jg}|jD]}|d|g7}q�|jr�|d|j|g7}t|td���\}}nJt|jdddd
d|gtd���\}	}|dd|g7}t|ttd��|	�\}}|��D],}t|�t	u�rB|�
d�}|�t|���q&t|�dk�rntd�dSd}
|D]@}||v�rvtd|j|j�d�|j|jtj|jf�d}
�qv|D]@}||v�r�td|j|j�d�|j|jtj|jf�d}
�q�|D]<}||v�rtd|j|j�d�|j|jtj|jf��q|
S)Nz+noallz+answerz-tZdsz-q)�stdoutr
cSs|j|j|jfSr()rrr)�rrr$r$r%�<lambda>_�zcheck.<locals>.<lambda>)�key�-a�-fZdnskey�-)�stdinr/rz$No DNSKEY records found in zone apexFTz/KSK for %s %s/%03d/%05d (%s) missing from child�.z0%s for KSK %s/%03d/%05d (%s) missing from parentz,%s for KSK %s/%03d/%05d (%s) found in parent)�	dssetfile�open�read�digrrZcommunicate�
splitlinesrrr�appendr�sorted�	dsfromkey�algo�
masterfiler�printrr�striprrr.r)�zone�argsZrrlist�fp�cmd�_�lineZklistrAZintods�matchr0r$r$r%�checkSsp

��

��
��
��
rLc	Cs�tjtdd�}d}tjdkr"dnd}|jdtdd�|jd	d
ddgtd
d�|jdddtj�t	|�d�tdd�|jdddtj�t	|�d�tdd�|jdddtdd�|jddd td!d�|jd"d#d$t
d%�|��}|j�
d&�|_|S)'Nz: checks DS coverage)�description�bin�ntZsbinrEz
zone to check)r�helpr4z--algorAr>zDS digest algorithm)�dest�action�defaultrrPz-dz--digr<z
path to 'dig')rQrSrrPz-Dz--dsfromkeyr@zdnssec-dsfromkeyzpath to 'dnssec-dsfromkey'r5z--filerBzzone master file)rQrrPz-sz--dssetr9zprepared DSset filez-vz	--versionr)rRrr8)�argparse�ArgumentParser�prog�os�name�add_argumentr�pathr rr�
parse_argsrErD)�parserZbindirZsbindirrFr$r$r%r[�s:�
�
����
�r[cCs&t�}t|j|�}t|rdnd�dS)Nrr)r[rLrE�exit)rFrKr$r$r%�main�sr^)rTrW�sys�
subprocessrrZ	isc.utilsrrrVrrLr[r^r$r$r$r%�<module>s9@ 

© 2025 Cubjrnet7