$97 GRAYBYTE WORDPRESS FILE MANAGER $79

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.15.130 | ADMIN IP 216.73.216.174
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/hc_python/lib/python3.12/site-packages/dns/__pycache__/

HOME
Current File : /opt/hc_python/lib/python3.12/site-packages/dns/__pycache__//renderer.cpython-312.pyc
�

L��g�+���dZddlZddlZddlZddlZddlZddlZddlZdZ	dZ
dZdZejd��ZGd�d�Zy)	z*Help for building DNS wire format messages�N���c#�K�|jd|z�|j�}d��|j�}||z
}|dkDrJ	|j||z
�	|j|j|d��	|j|�yy#t$rt
jj�wxYw#|j|�wxYw�w)N�r�big)�write�tell�seek�to_bytes�
OverflowError�dns�	exception�	FormError)�output�
length_length�start�end�lengths     �;/opt/hc_python/lib/python3.12/site-packages/dns/renderer.py�prefixed_lengthr#s�����
�L�L��-�'�(��K�K�M�E�	�
�+�+�-�C�
�5�[�F�
��z�	��K�K��
�-�.�
.����V�_�_�]�E�B�C�
�K�K�����
!�
.��m�m�-�-�-�
.��
�K�K���s0�AC
�B7�!B�=C
�$B4�4B7�7C
�
C
c�H�eZdZdZdd�Zd�Zd�Zejd��Z	ejd��Z
ejjfd�Zd	�Zd
�Zdd�Zdd�Zej&j(fd
�Zej&j(fd�Zd�Zd�Zd�Zdeddfd�Zdd�Zy)�Renderera�Helper class for building DNS wire-format messages.

    Most applications can use the higher-level L{dns.message.Message}
    class and its to_wire() method to generate wire-format messages.
    This class is for those applications which need finer control
    over the generation of messages.

    Typical use::

        r = dns.renderer.Renderer(id=1, flags=0x80, max_size=512)
        r.add_question(qname, qtype, qclass)
        r.add_rrset(dns.renderer.ANSWER, rrset_1)
        r.add_rrset(dns.renderer.ANSWER, rrset_2)
        r.add_rrset(dns.renderer.AUTHORITY, ns_rrset)
        r.add_rrset(dns.renderer.ADDITIONAL, ad_rrset_1)
        r.add_rrset(dns.renderer.ADDITIONAL, ad_rrset_2)
        r.add_edns(0, 0, 4096)
        r.write_header()
        r.add_tsig(keyname, secret, 300, 1, 0, '', request_mac)
        wire = r.get_wire()

    If padding is going to be used, then the OPT record MUST be
    written after everything else in the additional section except for
    the TSIG (if any).

    output, an io.BytesIO, where rendering is written

    id: the message id

    flags: the message flags

    max_size: the maximum size of the message

    origin: the origin to use when rendering relative names

    compress: the compression table

    section: an int, the section currently being rendered

    counts: list of the number of RRs in each section

    mac: the MAC of the rendered message (if TSIG was used)
    Nc�@�tj�|_|�tjdd�|_n||_||_||_||_i|_	t|_gd�|_|jjd�d|_d|_d|_y)zInitialize a new renderer.Nr�)rrrrs�F)�io�BytesIOr�random�randint�id�flags�max_size�origin�compress�QUESTION�section�countsr	�mac�reserved�
was_padded)�selfr!r"r#r$s     r�__init__zRenderer.__init__bs����j�j�l���
�:��n�n�Q��.�D�G��D�G���
� ��
������
����"��������,�'������
����c��|jj|�|jj�g}|jj	�D]\}}||k\s�|j|��|D]}|j|=�y)z�Truncate the output buffer at offset *where*, and remove any
        compression table entries that pointed beyond the truncation
        point.
        N)rr�truncater%�items�append)r,�where�keys_to_delete�k�vs     r�	_rollbackzRenderer._rollbackuss��	
����������������M�M�'�'�)�D�A�q��E�z��%�%�a�(�*� �A��
�
�a� � r.c��|j|k7r1|j|kDrtjj�||_yy)aSet the renderer's current section.

        Sections must be rendered order: QUESTION, ANSWER, AUTHORITY,
        ADDITIONAL.  Sections may be empty.

        Raises dns.exception.FormError if an attempt was made to set
        a section value less than the current section.
        N)r'rrr)r,r's  r�_set_sectionzRenderer._set_section�s8���<�<�7�"��|�|�g�%��m�m�-�-�-�"�D�L�#r.c#��K�|jj�}|��|jj�|jkDr+|j|�tj
j�y�w�N)rr
r#r7rr�TooBig)r,rs  r�_track_sizezRenderer._track_size�sW������� � �"�����;�;�����
�
�-��N�N�5�!��-�-�&�&�&�.�s�A2A4c#�K�|jj�}	|jj|�d��|jj|�y#|jj|�wxYw�wr;)rr
r)r,r3�currents   r�_temporarily_seek_tozRenderer._temporarily_seek_to�sV�����+�+�"�"�$��	&��K�K���U�#���K�K���W�%��D�K�K���W�%�s�A9�A�A9�A6�6A9c�p�|jt�|j�5|j|j|j
|j�|jjtjd||��ddd�|jtxxdz
cc<y#1swY�%xYw)zAdd a question to the message.z!HHNr)r9r&r=�to_wirerr%r$r	�struct�packr()r,�qname�rdtype�rdclasss    r�add_questionzRenderer.add_question�s}��	
���(�#�
�
�
�
��M�M�$�+�+�t�}�}�d�k�k�B��K�K���f�k�k�%���A�B� �	
���H���"�� �
�s�A"B,�,B5c��|j|�|j�5|j|j|j|j
fi|��}ddd�|j|xxz
cc<y#1swY�!xYw)z�Add the rrset to the specified section.

        Any keyword arguments are passed on to the rdataset's to_wire()
        routine.
        N�r9r=rBrr%r$r()r,r'�rrset�kw�ns     r�	add_rrsetzRenderer.add_rrset�se��	
���'�"�
�
�
�
���
�
�d�k�k�4�=�=�$�+�+�L��L�A� ����G���!�� �
�s�4A6�6A?c��|j|�|j�5|j||j|j|j
fi|��}ddd�|j|xxz
cc<y#1swY�!xYw)z�Add the rdataset to the specified section, using the specified
        name as the owner name.

        Any keyword arguments are passed on to the rdataset's to_wire()
        routine.
        NrJ)r,r'�name�rdatasetrLrMs      r�add_rdatasetzRenderer.add_rdataset�sj��	
���'�"�
�
�
�
� �� � ��t�{�{�D�M�M�4�;�;�U�RT�U�A� ����G���!�� �
�s�5A7�7Bc��|r�|j}|dk\sJ�|d}|jj�|z|z}||z}|r	d||z
z}nd}t|j�}	|	jtjjtjjj|��tjjj||j|	�}d|_|j!t"|�y)aMAdd *opt* to the additional section, applying padding if desired.  The
        padding will take the specified precomputed OPT size and TSIG size into
        account.

        Note that we don't have reliable way of knowing how big a GSS-TSIG digest
        might be, so we we might not get an even multiple of the pad in that case.�rrr.TN)�ttlrr
�list�optionsr2r�edns�
GenericOption�
OptionType�PADDING�message�Message�	_make_optrGr+rN�
ADDITIONAL)
r,�opt�pad�opt_size�	tsig_sizerU�	opt_rdata�size_without_padding�	remainderrWs
          r�add_optzRenderer.add_opt�s�����'�'�C��r�>�!�>��A��I�#'�;�;�#3�#3�#5��#@�9�#L� �,�s�2�I����y��1�����9�,�,�-�G��N�N�3�8�8�1�1�#�(�(�2E�2E�2M�2M�s�S�T��+�+�%�%�/�/��Y�5F�5F��P�C�"�D�O����z�3�'r.c��|dz}||dzz}tjjj|||�}|j	|�y)z&Add an EDNS OPT record to the message.l�~�N)rr\r]r^rg)r,rX�	ednsflags�payloadrWr`s      r�add_ednszRenderer.add_edns�sF��	�Z��	��T�R�Z��	��k�k�!�!�+�+�I�w��H�����S�r.c	
���|jj�}	t|tjj
�r|}
n!tjj|||�}
tjjj||d|d|||�}tjj|	|
|dttj��|�\}}|j||�y)z$Add a TSIG signature to the message.rr.N�
r�getvalue�
isinstancer�tsig�Keyr\r]�
_make_tsig�sign�int�time�_write_tsig)
r,�keyname�secret�fudger!�
tsig_error�
other_data�request_mac�	algorithm�s�keyrq�_s
             r�add_tsigzRenderer.add_tsig�s���
�K�K� � �"���f�c�h�h�l�l�+��C��(�(�,�,�w��	�:�C��{�{�"�"�-�-��Y��5�#�r�:�z�
���H�H�M�M�!�S�$�q�'�3�t�y�y�{�3C�[�Q�	��q�����w�'r.c

���|jj�}
t|tjj
�r|}n!tjj|||	�}tjjj||	d|d|||�}tjj|
||dttj��||d�\}}|j||�|S)ayAdd a TSIG signature to the message. Unlike add_tsig(), this can be
        used for a series of consecutive DNS envelopes, e.g. for a zone
        transfer over TCP [RFC2845, 4.4].

        For the first message in the sequence, give ctx=None. For each
        subsequent message, give the ctx that was returned from the
        add_multi_tsig() call for the previous message.rr.Trn)
r,�ctxrxryrzr!r{r|r}r~rr�rqs
             r�add_multi_tsigzRenderer.add_multi_tsig�s���(
�K�K� � �"���f�c�h�h�l�l�+��C��(�(�,�,�w��	�:�C��{�{�"�"�-�-��Y��5�#�r�:�z�
���h�h�m�m�
�s�D��G�S�����-�{�C��
���s�	
����w�'��
r.c	�L�|jrd}n|j}|jt�|j	�5|j|j||j�|jjtjdtjjtjjd��t!|jd�5|j|j�ddd�ddd�|j"txxdz
cc<|j%d�5|jjtjd|j"t��ddd�y#1swY��xYw#1swY��xYw#1swYyxYw)Nz!HHIrrr�
z!H)r+r%r9r_r=rBrr$r	rCrDr�	rdatatype�TSIG�
rdataclass�ANYrr(r@)r,rqrxr%s    rrwzRenderer._write_tsig"s���?�?��H��}�}�H����*�%�
�
�
�
��O�O�D�K�K��4�;�;�?��K�K������F�C�M�M�$6�$6����8J�8J�A�N�
�!����a�0����T�[�[�)�1� �	
���J��1�$��
�
&�
&�r�
*��K�K���f�k�k�$����J�0G�H�I�+�
*�	1�0�� �
��+�
*�s2�BF� F�<F�8AF�F	�F�F�F#c
�H�|jd�5|jjtjd|j
|j|jd|jd|jd|jd��ddd�y#1swYyxYw)z�Write the DNS message header.

        Writing the DNS message header is done after all sections
        have been rendered, but before the optional TSIG signature
        is added.
        rz!HHHHHHrrrN)r@rr	rCrDr!r"r(�r,s r�write_headerzRenderer.write_header4sy���
&�
&�q�
)��K�K��������G�G��J�J��K�K��N��K�K��N��K�K��N��K�K��N��

�*�
)�
)�s�A=B�B!c�6�|jj�S)zReturn the wire format message.)rror�s r�get_wirezRenderer.get_wireIs���{�{�#�#�%�%r.�size�returnc��|dkrtd��||jkDrtd��|xj|z
c_|xj|zc_y)zReserve *size* bytes.rz$reserved amount must be non-negativez)cannot reserve more than the maximum sizeN)�
ValueErrorr#r*)r,r�s  r�reservezRenderer.reserveNsI���!�8��C�D�D��$�-�-���H�I�I��
�
���
��
�
���
r.c�P�|xj|jz
c_d|_y)zRelease the reserved bytes.rN)r#r*r�s r�release_reservedzRenderer.release_reservedWs���
�
����&�
���
r.)NrrN)rrrr;)r�N)�__name__�
__module__�__qualname__�__doc__r-r7r9�
contextlib�contextmanagerr=r@rr��INrHrNrRrgrlrq�default_algorithmr�r�rwr�r�rur�r��r.rrr5s���*�X �&
!�
#����'��'����&��&�36�.�.�2C�2C�#�
"�"�(�.�$�(�(�,�,�(�F�(�(�,�,�!�FJ�$�*&�
�C��D��r.r)r�r�rrrCrv�
dns.exceptionr�dns.tsigr&�ANSWER�	AUTHORITYr_r�rrr�r.r�<module>r�sY��$1��	�
�
������	
��
�	�
�
�������"e�er.


Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
4 Apr 2025 8.03 AM
root / root
0755
__init__.cpython-312.pyc
0.682 KB
4 Apr 2025 8.03 AM
root / root
0644
_asyncbackend.cpython-312.pyc
4.683 KB
4 Apr 2025 8.03 AM
root / root
0644
_asyncio_backend.cpython-312.pyc
13.935 KB
4 Apr 2025 8.03 AM
root / root
0644
_ddr.cpython-312.pyc
7.592 KB
4 Apr 2025 8.03 AM
root / root
0644
_features.cpython-312.pyc
3.195 KB
4 Apr 2025 8.03 AM
root / root
0644
_immutable_ctx.cpython-312.pyc
3.136 KB
4 Apr 2025 8.03 AM
root / root
0644
_trio_backend.cpython-312.pyc
13.129 KB
4 Apr 2025 8.03 AM
root / root
0644
asyncbackend.cpython-312.pyc
3.314 KB
4 Apr 2025 8.03 AM
root / root
0644
asyncquery.cpython-312.pyc
36.653 KB
4 Apr 2025 8.03 AM
root / root
0644
asyncresolver.cpython-312.pyc
20.802 KB
4 Apr 2025 8.03 AM
root / root
0644
dnssec.cpython-312.pyc
50.303 KB
4 Apr 2025 8.03 AM
root / root
0644
dnssectypes.cpython-312.pyc
1.906 KB
4 Apr 2025 8.03 AM
root / root
0644
e164.cpython-312.pyc
4.768 KB
4 Apr 2025 8.03 AM
root / root
0644
edns.cpython-312.pyc
25.072 KB
4 Apr 2025 8.03 AM
root / root
0644
entropy.cpython-312.pyc
5.778 KB
4 Apr 2025 8.03 AM
root / root
0644
enum.cpython-312.pyc
4.746 KB
4 Apr 2025 8.03 AM
root / root
0644
exception.cpython-312.pyc
7.031 KB
4 Apr 2025 8.03 AM
root / root
0644
flags.cpython-312.pyc
2.973 KB
4 Apr 2025 8.03 AM
root / root
0644
grange.cpython-312.pyc
1.706 KB
4 Apr 2025 8.03 AM
root / root
0644
immutable.cpython-312.pyc
3.668 KB
4 Apr 2025 8.03 AM
root / root
0644
inet.cpython-312.pyc
6.521 KB
4 Apr 2025 8.03 AM
root / root
0644
ipv4.cpython-312.pyc
2.637 KB
4 Apr 2025 8.03 AM
root / root
0644
ipv6.cpython-312.pyc
6.642 KB
4 Apr 2025 8.03 AM
root / root
0644
message.cpython-312.pyc
84.558 KB
4 Apr 2025 8.03 AM
root / root
0644
name.cpython-312.pyc
47.996 KB
4 Apr 2025 8.03 AM
root / root
0644
namedict.cpython-312.pyc
4.227 KB
4 Apr 2025 8.03 AM
root / root
0644
nameserver.cpython-312.pyc
14.067 KB
4 Apr 2025 8.03 AM
root / root
0644
node.cpython-312.pyc
16.221 KB
4 Apr 2025 8.03 AM
root / root
0644
opcode.cpython-312.pyc
3.039 KB
4 Apr 2025 8.03 AM
root / root
0644
query.cpython-312.pyc
63.102 KB
4 Apr 2025 8.03 AM
root / root
0644
rcode.cpython-312.pyc
4.306 KB
4 Apr 2025 8.03 AM
root / root
0644
rdata.cpython-312.pyc
37.637 KB
4 Apr 2025 8.03 AM
root / root
0644
rdataclass.cpython-312.pyc
3.418 KB
4 Apr 2025 8.03 AM
root / root
0644
rdataset.cpython-312.pyc
22.372 KB
4 Apr 2025 8.03 AM
root / root
0644
rdatatype.cpython-312.pyc
9.981 KB
4 Apr 2025 8.03 AM
root / root
0644
renderer.cpython-312.pyc
15.75 KB
4 Apr 2025 8.03 AM
root / root
0644
resolver.cpython-312.pyc
86.043 KB
4 Apr 2025 8.03 AM
root / root
0644
reversename.cpython-312.pyc
4.598 KB
4 Apr 2025 8.03 AM
root / root
0644
rrset.cpython-312.pyc
12.163 KB
4 Apr 2025 8.03 AM
root / root
0644
serial.cpython-312.pyc
5.043 KB
4 Apr 2025 8.03 AM
root / root
0644
set.cpython-312.pyc
11.921 KB
4 Apr 2025 8.03 AM
root / root
0644
tokenizer.cpython-312.pyc
25.912 KB
4 Apr 2025 8.03 AM
root / root
0644
transaction.cpython-312.pyc
28.622 KB
4 Apr 2025 8.03 AM
root / root
0644
tsig.cpython-312.pyc
16.346 KB
4 Apr 2025 8.03 AM
root / root
0644
tsigkeyring.cpython-312.pyc
2.811 KB
4 Apr 2025 8.03 AM
root / root
0644
ttl.cpython-312.pyc
2.368 KB
4 Apr 2025 8.03 AM
root / root
0644
update.cpython-312.pyc
15.873 KB
4 Apr 2025 8.03 AM
root / root
0644
version.cpython-312.pyc
0.734 KB
4 Apr 2025 8.03 AM
root / root
0644
versioned.cpython-312.pyc
14.258 KB
4 Apr 2025 8.03 AM
root / root
0644
win32util.cpython-312.pyc
9.313 KB
4 Apr 2025 8.03 AM
root / root
0644
wire.cpython-312.pyc
5.304 KB
4 Apr 2025 8.03 AM
root / root
0644
xfr.cpython-312.pyc
14.116 KB
4 Apr 2025 8.03 AM
root / root
0644
zone.cpython-312.pyc
65.902 KB
4 Apr 2025 8.03 AM
root / root
0644
zonefile.cpython-312.pyc
32.975 KB
4 Apr 2025 8.03 AM
root / root
0644
zonetypes.cpython-312.pyc
1.295 KB
4 Apr 2025 8.03 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF