shell bypass 403

Cubjrnet7 Shell


name : update.cpython-39.opt-1.pyc
a

�M�e�/�@s�dZddlmZmZmZmZddlZddlZddl	Zddl
ZddlZddlZddl
ZddlZGdd�dejj�ZGdd�dejj�ZeZejZejZejZejZdS)zDNS Dynamic Update Support�)�Any�List�Optional�UnionNc@s,eZdZdZdZdZdZdZedd��Z	dS)	�
UpdateSectionzUpdate sectionsr���cCsdS)Nr	�)�clsr
r
�./usr/lib/python3.9/site-packages/dns/update.py�_maximum(szUpdateSection._maximumN)
�__name__�
__module__�__qualname__�__doc__�ZONE�PREREQ�UPDATE�
ADDITIONAL�classmethodr
r
r
r
rr srcs�eZdZeZdejjddejj	dfe
eejj
efejje
ee
ejj
eejj
efe
ed��fdd�
Zeeejjd�dd��Zejdd��Zeeejjd�d	d
��Zejdd
��Zeeejjd�dd
��Zejdd
��Zd#dd�Zdd�Zeejj
efedd�dd�Zeejj
efedd�dd�Zeejj
efedd�dd�Zeejj
efedd�dd�Z d$eejj
efe
eej!j"efdd�dd�Z#dd �Z$d!d"�Z%�Z&S)%�
UpdateMessageN)�zone�rdclass�keyring�keyname�keyalgorithm�idcs�t�j|d�|jtj�tjj�O_t|t�r>tj	�
|�}||_tjj
�|�}||_|jr||j|j|j|tjjddd�|dur�|j|||d�dS)axInitialize a new DNS Update object.

        See the documentation of the Message class for a complete
        description of the keyring dictionary.

        *zone*, a ``dns.name.Name``, ``str``, or ``None``, the zone
        which is being updated.  ``None`` should only be used by dnspython's
        message constructors, as a zone is required for the convenience
        methods like ``add()``, ``replace()``, etc.

        *rdclass*, an ``int`` or ``str``, the class of the zone.

        The *keyring*, *keyname*, and *keyalgorithm* parameters are passed to
        ``use_tsig()``; see its documentation for details.
        )rT)ZcreateZforce_uniqueN)�	algorithm)�super�__init__�flags�dnsZopcodeZto_flagsr�
isinstance�str�name�	from_text�origin�
rdataclass�
RdataClass�make�zone_rdclass�
find_rrsetr�	rdatatype�SOAZuse_tsig)�selfrrrrrr��	__class__r
rr 1s$
�zUpdateMessage.__init__)�returncCs
|jdS)zThe zone section.r�Zsections�r/r
r
rr\szUpdateMessage.zonecCs||jd<dS)Nrr3�r/�vr
r
rrascCs
|jdS)zThe prerequisite section.rr3r4r
r
r�prerequisiteeszUpdateMessage.prerequisitecCs||jd<dS)Nrr3r5r
r
rr7jscCs
|jdS)zThe update section.rr3r4r
r
r�updatenszUpdateMessage.updatecCs||jd<dS)Nrr3r5r
r
rr8ssc
CsB|dur|j}|��}|�|||j|j||dd�}|�||�dS)z&Add a single RR to the update section.NT)r8�coversr,r+�rdtype�add)r/r%�ttl�rd�deleting�sectionr9�rrsetr
r
r�_add_rrws�zUpdateMessage._add_rrc
Gst|t�rtj�|d�}t|dtjj�rf|D]4}|rD|�||j�|D]}|j	||j
||d�qHq.n�t|�}t|�
d��}t|dtjj�r�|r�|�||dj�|D]}|j	||||d�q�nVtjj�|�
d��}|r�|�||�|D],}	tj�|j||	|j�}|j	||||d�q�dS)a�Add records.

        *replace* is the replacement mode.  If ``False``,
        RRs are added to an existing RRset; if ``True``, the RRset
        is replaced with the specified contents.  The second
        argument is the section to add to.  The third argument
        is always a name.  The other arguments can be:

                - rdataset...

                - ttl, rdata...

                - ttl, rdtype, string...
        Nr)r?)r#r$r"r%r&�rdataset�Rdataset�deleter:rAr<�list�int�pop�rdata�Rdatar-�	RdataTyper*r+r')
r/�replacer?r%�args�rdsr=r<r:�sr
r
r�_add�s*
zUpdateMessage._add)r%rLr2cGs|jd|j|g|�R�dS)z�Add records.

        The first argument is always a name.  The other
        arguments can be:

                - rdataset...

                - ttl, rdata...

                - ttl, rdtype, string...
        FN�rOr8�r/r%rLr
r
rr;�s
zUpdateMessage.addc
GsHt|t�rtj�|d�}t|�dkrP|�|j|tjj	tj
j	tj
jtjj	dd�n�t|dtjj
�r�|D]"}|D]}|�|d|tjj�qnqfn�t|�}t|dtjj�r�|D]}|�|d|tjj�q�n~tj
j�|�d��}t|�dk�r|�|j||j|tj
jtjj	dd�n6|D]0}tj�|j|||j�}|�|d|tjj��qdS)z�Delete records.

        The first argument is always a name.  The other
        arguments can be:

                - *empty*

                - rdataset...

                - rdata...

                - rdtype, [string...]
        NrT)r#r$r"r%r&�lenr,r8r(�ANYr-�NONErBrCrArErHrIrJr*rGr+r')r/r%rLrMr=�largsr:rNr
r
rrD�sR
�
��zUpdateMessage.deletecGs|jd|j|g|�R�dS)abReplace records.

        The first argument is always a name.  The other
        arguments can be:

                - rdataset...

                - ttl, rdata...

                - ttl, rdtype, string...

        Note that if you want to replace the entire node, you should do
        a delete of the name followed by one or more calls to add.
        TNrPrQr
r
rrK�szUpdateMessage.replacec
Gst|t�rtj�|d�}t|�dkrL|�|j|tjj	tj
j	tj
jddd�n�t|dtjj
�s|t|dtjj�s|t|�dkr�t|dtjj
�s�t|�}|�dd�|jd|j|g|�R�n|jd|j|g|�R�n4tj
j�|d�}|�|j|tjj	|tj
jddd�dS)aSRequire that an owner name (and optionally an rdata type,
        or specific rdataset) exists as a prerequisite to the
        execution of the update.

        The first argument is always a name.
        The other arguments can be:

                - rdataset...

                - rdata...

                - rdtype, string...
        NrTrF)r#r$r"r%r&rRr,r7r(rSr-rTrBrCrHrIrE�insertrOrJr*)r/r%rLrUr:r
r
r�presentsF
���
��zUpdateMessage.present)r%r:r2c
Cs|t|t�rtj�|d�}|durH|�|j|tjjtj	j
tj	jddd�n0tj	j�|�}|�|j|tjj|tj	jddd�dS)z�Require that an owner name (and optionally an rdata type) does
        not exist as a prerequisite to the execution of the update.NT)
r#r$r"r%r&r,r7r(rTr-rSrJr*)r/r%r:r
r
r�absent<s0
��zUpdateMessage.absentcCsdS)NTr
)r/�valuer
r
r�_get_one_rr_per_rrset^sz#UpdateMessage._get_one_rr_per_rrsetcCs�d}d}|tjkr:tj�|�s0|tjjks0|jr�tjj	�nH|jsHtjj	�|tjj
tjjfvr�|}|jdj}|tjj
kp�|tj
k}||||fS)NFr)rrr"r(Zis_metaclassr-r.r�	exceptionZ	FormErrorrSrTrr)r/r?r%rr:r>�emptyr
r
r�_parse_rr_headerbs$

�
��
�zUpdateMessage._parse_rr_header)NN)N)'rrrrZ
_section_enumr"r(�INZtsigZdefault_algorithmrrr%�Namer$r)rrFr �propertyrr@ZRRsetr�setterr7r8rArOr;rDrKrWr-rJrXrZr]�
__classcell__r
r
r0rr-sR�
�+



(<8��"r)r�typingrrrrZdns.messager"Zdns.nameZ
dns.opcodeZ	dns.rdataZdns.rdataclassZdns.rdatasetZ
dns.rdatatypeZdns.tsig�enum�IntEnumr�messageZMessagerZUpdaterrrrr
r
r
r�<module>s$
N

© 2025 Cubjrnet7