%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/dns/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/dns/__pycache__/name.cpython-312.pyc

�

5��e���
�J�dZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZm
Z
ddlZddlZddlZddlZddlZej(j+d�rddlZdZndZe	defZGd�d	ej4j6�Zej:Zej>Z ejBZ"ejFZ$ejJZ&Gd
�dejNjP�Z)Gd�d
ejNjP�Z*Gd�dejNjV�Z,Gd�dejNjV�Z-Gd�dejNj\�Z/Gd�dejNjV�Z0Gd�dejNjP�Z1Gd�dejNj\�Z2Gd�dejNj\�Z3Gd�dejNj\�Z4Gd�dejNj\�Z5Gd �d!ejNj\�Z6d"Z7d#Z8d$e
e9e:fd%e:fd&�Z;Gd'�d(�Z<Gd)�d*e<�Z=Gd+�d,e<�Z>e=d�Z?e=d�Z@e?ZAe>dddd�ZBe>dddd�ZCe>dddd�ZDe>dddd�ZEeBZFd-ee9d.fd%dfd/�ZGd$e
e9e:fd%e9fd0�ZHej�j�Gd1�d��ZJeJd2g�ZKeJg�ZLeKdfd3e:d4eeJd5ee<d%eJfd6�ZMd3e:d%eNfd7�ZOeKdfd3e
e9e:fd4eeJd5ee<d%eJfd8�ZPd9d:d%eJfd;�ZQd<e9d=ed%eeJeffd>�ZRd?ZSeTeS�ZUeJeSg�ZVd@ZWeTeW�ZXeTdA�ZYeTdB�ZZdC�Z[dD�Z\dE�Z]dFeJd4eJdGeNd%eJfdH�Z^dFeJd4eJdGeNd%eJfdI�Z_dJeeJeJeNgeJfdFeJd4eJdGeNd%eJf
dK�Z`y)LzDNS Names.
�N)�Any�Callable�Dict�Iterable�Optional�Tuple�Union�idnaTF�Namec�D�eZdZdZdZdZdZdZdZe	d��Z
e	d��Zy	)
�NameRelationz(Name relation result from fullcompare().r����c��|jS�N)�COMMONANCESTOR��clss �*/usr/lib/python3/dist-packages/dns/name.py�_maximumzNameRelation._maximum<s���!�!�!�c��|jSr)�__name__rs r�_short_namezNameRelation._short_name@s���|�|�rN)r�
__module__�__qualname__�__doc__�NONE�SUPERDOMAIN�	SUBDOMAIN�EQUALr�classmethodrr�rrr
r
+sF��2�
�D��K��I�
�E��N��"��"����rr
c��eZdZdZy)�
EmptyLabelzA DNS label is empty.N�rrrrr%rrr'r'Ms��rr'c��eZdZdZy)�	BadEscapez8An escaped code in a text format of DNS name is invalid.Nr(r%rrr*r*Qs��Brr*c��eZdZdZy)�
BadPointerz=A DNS compression pointer points forward instead of backward.Nr(r%rrr,r,Us��Grr,c��eZdZdZy)�BadLabelTypez2The label type in DNS name wire format is unknown.Nr(r%rrr.r.Ys��<rr.c��eZdZdZy)�NeedAbsoluteNameOrOriginzvAn attempt was made to convert a non-absolute name to
    wire when there was also a non-absolute (or missing) origin.Nr(r%rrr0r0]s��Drr0c��eZdZdZy)�NameTooLongz A DNS name is > 255 octets long.Nr(r%rrr2r2b���*rr2c��eZdZdZy)�LabelTooLongz A DNS label is > 63 octets long.Nr(r%rrr5r5fr3rr5c��eZdZdZy)�AbsoluteConcatenationz]An attempt was made to append anything other than the
    empty name to an absolute DNS name.Nr(r%rrr7r7js��+rr7c��eZdZdZy)�NoParentzMAn attempt was made to get the parent of the root name
    or the empty name.Nr(r%rrr9r9os��rr9c��eZdZdZy)�
NoIDNA2008zLIDNA 2008 processing was requested but the idna module is not
    available.Nr(r%rrr;r;ts��rr;c�,��eZdZdZdhZdZ�fd�Z�xZS)�
IDNAExceptionz$IDNA processing raised an exception.�idna_exceptionz+IDNA processing exception: {idna_exception}c�$��t�|�|i|��yr)�super�__init__)�self�args�kwargs�	__class__s   �rrAzIDNAException.__init__�s���
���$�)�&�)r)rrrr�supp_kwargs�fmtrA�
__classcell__�rEs@rr=r=ys���.�#�$�K�
7�C�*�*rr=c��eZdZdZy)�NeedSubdomainOfOriginzNAn absolute name was provided that is not a subdomain of the specified origin.Nr(r%rrrKrK�s��XrrKs"().;\@$z"().;\@$�label�returnc��t|t�rFd}|D]=}|tvr|dt|�zz
}�|dkDr|dkr|t|�z
}�6|d|zz
}�?|Sd}|D]/}|tvr	|d|zz
}�|dkr|dt|�zz
}�+||z
}�1|S)zaEscape the characters in label which need it.
    @returns: the escaped string
    @rtype: string��\� �z\%03d� )�
isinstance�bytes�_escaped�chr�
_escaped_text�ord)rL�text�c�ucs    r�	_escapifyr]�s����%������	%�A��H�}���s�1�v�
�%���T��a�$�h���A������1��$��
	%����D����
����D�2�I��D�
�6�\��H�s�2�w�&�&�D��B�J�D�
��Krc�F�eZdZdZd�Zdedefd�Zdedefd�Z	dedefd�Z
y)	�	IDNACodecz.Abstract base class for IDNA encoder/decoders.c��yrr%�rBs rrAzIDNACodec.__init__�s��rrLrMc�@�|j�jd�S)Nsxn--)�lower�
startswith�rBrLs  r�is_idnazIDNACodec.is_idna�s���{�{�}�'�'��0�0rc��t�r)�NotImplementedErrorres  r�encodezIDNACodec.encode�s��!�!rc��|j|�r 	|ddjd�}t|�St|�S#t$r}t	|���d}~wwxYw)Nr�punycode�r>)rf�decoder]�	Exceptionr=)rBrL�slabel�es    rrmzIDNACodec.decode�s^���<�<���
6��q�r��)�)�*�5�� ��(�(��U�#�#���
6�#�1�5�5��
6�s�=�	A�A�AN)rrrrrArU�boolrf�strrirmr%rrr_r_�sC��8�
�1�U�1�t�1�"�C�"�E�"�	$�E�	$�c�	$rr_c�N��eZdZdZddef�fd�
Zdedefd�Zdedef�fd�Z	�xZ
S)	�
IDNA2003CodeczIDNA 2003 encoder/decoder.�
strict_decodec�0��t�|��||_y)z�Initialize the IDNA 2003 encoder/decoder.

        *strict_decode* is a ``bool``. If `True`, then IDNA2003 checking
        is done when decoding.  This can cause failures if the name
        was encoded with IDNA2008.  The default is `False`.
        N)r@rAru)rBrurEs  �rrAzIDNA2003Codec.__init__�s���	����*��rrLrMc�t�|dk(ry	tjj|�S#t$rt�wxYw)zEncode *label*.rOr)�	encodingsr
�ToASCII�UnicodeErrorr5res  rrizIDNA2003Codec.encode�s=���B�;��	��>�>�)�)�%�0�0���	���	�s�'�7c����|jst�|�	|�S|dk(ry	ttj
j
|��S#t$r}t|���d}~wwxYw)zDecode *label*.rrOrlN)	rur@rmr]rxr
�	ToUnicodernr=)rBrLrprEs   �rrmzIDNA2003Codec.decode�s_����!�!��7�>�%�(�(��C�<��	2��Y�^�^�5�5�e�<�=�=���	2��q�1�1��	2�s�'A�	A&�A!�!A&�F�rrrrrqrArrrUrirmrHrIs@rrtrt�s=���$�	+�d�	+��C��E��	2�E�	2�c�	2�	2rrtc	�b��eZdZdZ				ddedededef�fd�
Zdedefd	�Zdedef�fd
�Z	�xZ
S)�
IDNA2008CodeczIDNA 2008 encoder/decoder.�uts_46�transitional�allow_pure_asciiruc�Z��t�|��||_||_||_||_y)aInitialize the IDNA 2008 encoder/decoder.

        *uts_46* is a ``bool``.  If True, apply Unicode IDNA
        compatibility processing as described in Unicode Technical
        Standard #46 (https://unicode.org/reports/tr46/).
        If False, do not apply the mapping.  The default is False.

        *transitional* is a ``bool``: If True, use the
        "transitional" mode described in Unicode Technical Standard
        #46.  The default is False.

        *allow_pure_ascii* is a ``bool``.  If True, then a label which
        consists of only ASCII characters is allowed.  This is less
        strict than regular IDNA 2008, but is also necessary for mixed
        names, e.g. a name with starting with "_sip._tcp." and ending
        in an IDN suffix which would otherwise be disallowed.  The
        default is False.

        *strict_decode* is a ``bool``: If True, then IDNA2008 checking
        is done when decoding.  This can cause failures if the name
        was encoded with IDNA2003.  The default is False.
        N)r@rAr�r�r�ru)rBr�r�r�rurEs     �rrAzIDNA2008Codec.__init__�s/���:	�������(��� 0���*��rrLrMc��|dk(ry|jr2t|�r'|jd�}t|�dkDrt�|St
st�	|jr!tj|d|j�}tj|�S#tj$r)}|jddk(rt�t|���d}~wwxYw)	NrOr�ascii�?FrzLabel too longrl)r��is_all_asciiri�lenr5�have_idna_2008r;r�r
�uts46_remapr��alabel�	IDNAErrorrCr=)rBrL�encodedrps    rrizIDNA2008Codec.encodes����B�;��� � �\�%�%8��l�l�7�+�G��7�|�b� �"�"��N����	6��{�{��(�(���t�7H�7H�I���;�;�u�%�%���~�~�	6��v�v�a�y�,�,�"�"�#�1�5�5��		6�s�AB�C�'$C�Cc�T��|jst�|�	|�S|dk(rytst�	tj|�}|jr!tj|d|j�}t|�S#t
jtf$r}t|���d}~wwxYw)NrrOFrl)rur@rmr�r;r
�ulabelr�r�r�r]r�rzr=)rBrLr�rprEs    �rrmzIDNA2008Codec.decode s�����!�!��7�>�%�(�(��C�<�����	2��[�[��'�F��{�{��)�)�&�%��9J�9J�K���V�$�$������-�	2��q�1�1��	2�s�AA=�=B'�B"�"B')FFFFr~rIs@rr�r��sk���$��"�!&�#�!+��!+��!+��	!+�
�!+�F6�C�6�E�6�(
2�E�
2�c�
2�
2rr��labels.c���t|�}d}d}d}|D]1}t|�}||dzz
}|dkDrt�|dkr|dk(r|}|dz
}�3|dkDrt�|dk\r||dz
k7rt�yy)aXCheck for empty labels in the middle of a label sequence,
    labels that are too long, and for too many labels.

    Raises ``dns.name.NameTooLong`` if the name as a whole is too long.

    Raises ``dns.name.EmptyLabel`` if a label is empty (i.e. the root
    label) and appears in a position other than the end of the label
    sequence

    r���rr�r�N)r�r5r2r')r��l�total�i�jrL�lls       r�_validate_labelsr�:s���	�F��A�
�E�
�A�	�A����
��Z��
��a����
��7����q�5�U�c�\��A�	�Q����
�s�{����A�v�!�q�1�u�*����vrc�r�t|t�r|St|t�r|j�St�)zcIf label is ``str``, convert it to ``bytes``.  If it is already
    ``bytes`` just return it.

    )rTrUrrri�
ValueError)rLs r�_maybe_convert_to_binaryr�Xs/���%������%����|�|�~��
�rc���eZdZdZdgZdeeeeffd�Z	d�Z
d�Zd�Z�fd�Z
defd	�Zdefd
�Zdefd�Zdddeeeeffd
�Zdddefd�Zdddefd�Zd3d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d4dedefd�Z!	d5dede"e#defd�Z$d6de"ddefd�Z%				d7de"e&d e"e'de"dd!ede"ef
d"�Z(defd#�Z)d$�Z*d%�Z+d&�Z,d'eded(fd)�Z-d8d*�Z.d9d+�Z/d9d,�Z0	d:de"dd-eddfd.�Z1d3d/�Z2d;ddd0eddfd1�Z3d;ddd0eddfd2�Z4�xZ5S)<rz�A DNS name.

    The dns.name.Name class represents a DNS name as a tuple of
    labels.  Each label is a ``bytes`` in DNS wire format.  Instances
    of the class are immutable.
    r�c��|D�cgc]
}t|���}}t|�|_t|j�ycc}w)z?*labels* is any iterable whose values are ``str`` or ``bytes``.N)r��tupler�r�)rBr��x�blabelss    rrAz
Name.__init__ps:��9?�?�1�+�A�.�?��?��G�n�������%��@s�?c�,�t|j�Sr)rr�ras r�__copy__z
Name.__copy__ws���D�K�K� � rc�T�ttj|j|��Sr)r�copy�deepcopyr�)rB�memos  r�__deepcopy__zName.__deepcopy__zs���D�M�M�$�+�+�t�4�5�5rc��d|jiS�Nr��r�ras r�__getstate__zName.__getstate__}s���$�+�+�&�&rc�V��t�|�d|d�t|j�yr�)r@�__setattr__r�r�)rB�staterEs  �r�__setstate__zName.__setstate__�s"���
���H�e�H�o�6�����%rrMc�Z�t|j�dkDxr|jddk(S)z`Is the most significant label of this name the root label?

        Returns a ``bool``.
        rr�r�r�r�ras r�is_absolutezName.is_absolute�s*���4�;�;��!�#�>����B��3�(>�>rc�Z�t|j�dkDxr|jddk(S)zdIs this name wild?  (I.e. Is the least significant label '*'?)

        Returns a ``bool``.
        r�*r�ras r�is_wildzName.is_wild�s*���4�;�;��!�#�>����A��$�(>�>rc�l�d}|jD]"}|j�D]
}||dz|zz
}��$|S)zQReturn a case-insensitive hash of the name.

        Returns an ``int``.
        rr)r�rc)rB�hrLr[s    r�__hash__z
Name.__hash__�sJ��
���[�[�	"�E��[�[�]�
"���a�1�f��\�!��
"�	"��r�otherc���|j�}|j�}||k7r(|rtjddfStjddfSt|j�}t|j�}||z
}|dkr|}n|}d}d}	tj}
|dkDr�|dz}|dz}|dz}|j|j�}|j|j�}||krd}|	dkDrtj}
|
||	fS||kDrd}|	dkDrtj}
|
||	fS|	dz
}	|dkDr��|}|dkrtj}
n&|dkDrtj}
ntj}
|
||	fS)a�Compare two names, returning a 3-tuple
        ``(relation, order, nlabels)``.

        *relation* describes the relation ship between the names,
        and is one of: ``dns.name.NameRelation.NONE``,
        ``dns.name.NameRelation.SUPERDOMAIN``, ``dns.name.NameRelation.SUBDOMAIN``,
        ``dns.name.NameRelation.EQUAL``, or ``dns.name.NameRelation.COMMONANCESTOR``.

        *order* is < 0 if *self* < *other*, > 0 if *self* > *other*, and ==
        0 if *self* == *other*.  A relative name is always less than an
        absolute name.  If both names have the same relativity, then
        the DNSSEC order relation is used to order them.

        *nlabels* is the number of significant labels that the two names
        have in common.

        Here are some examples.  Names ending in "." are absolute names,
        those not ending in "." are relative names.

        =============  =============  ===========  =====  =======
        self           other          relation     order  nlabels
        =============  =============  ===========  =====  =======
        www.example.   www.example.   equal        0      3
        www.example.   example.       subdomain    > 0    2
        example.       www.example.   superdomain  < 0    2
        example1.com.  example2.com.  common anc.  < 0    2
        example1       example2.      none         < 0    0
        example1.      example2       none         > 0    0
        =============  =============  ===========  =====  =======
        rrr�)
r�r
r r�r�rcrr!r"r#)
rBr��sabs�oabs�l1�l2�ldiffr��order�nlabels�namereln�label1�label2s
             r�fullcomparezName.fullcompare�s���@���!��� � �"���4�<��$�)�)�1�a�0�0�$�)�)�2�q�1�1�
����
��
����
���R����1�9��A��A������$�$���!�e�
��F�A��!�G�B��!�G�B��[�[��_�*�*�,�F��\�\�"�%�+�+�-�F�������Q�;�+�:�:�H� �%��1�1��&�����Q�;�+�:�:�H� �%��1�1��q�L�G�!�!�e�"���1�9�#�/�/�H�
�Q�Y�#�-�-�H�#�)�)�H��%��)�)rc�|�|j|�\}}}|tjk(s|tjk(ryy)z�Is self a subdomain of other?

        Note that the notion of subdomain includes equality, e.g.
        "dnspython.org" is a subdomain of itself.

        Returns a ``bool``.
        TF)r�r
r"r#�rBr��nr�_s    r�is_subdomainzName.is_subdomain�s;���%�%�e�,�
��Q��
��'�'�'�2��1C�1C�+C��rc�|�|j|�\}}}|tjk(s|tjk(ryy)z�Is self a superdomain of other?

        Note that the notion of superdomain includes equality, e.g.
        "dnspython.org" is a superdomain of itself.

        Returns a ``bool``.
        TF)r�r
r!r#r�s    r�is_superdomainzName.is_superdomain�s;���%�%�e�,�
��Q��
��)�)�)�R�<�3E�3E�-E��rc�n�t|jD�cgc]}|j���c}�Scc}w)zcReturn a name which is equal to the current name, but is in
        DNSSEC canonical form.
        )rr�rc)rBr�s  r�canonicalizezName.canonicalize	s'��
����4�1�Q�W�W�Y�4�5�5��4s�2c�R�t|t�r|j|�ddk(Sy)NrrF�rTrr��rBr�s  r�__eq__zName.__eq__s*���e�T�"��#�#�E�*�1�-��2�2�rc�R�t|t�r|j|�ddk7Sy)NrrTr�r�s  r�__ne__zName.__ne__s*���e�T�"��#�#�E�*�1�-��2�2�rc�\�t|t�r|j|�ddkStS�Nrr�rTrr��NotImplementedr�s  r�__lt__zName.__lt__�-���e�T�"��#�#�E�*�1�-��1�1�!�!rc�\�t|t�r|j|�ddkStSr�r�r�s  r�__le__zName.__le__"�-���e�T�"��#�#�E�*�1�-��2�2�!�!rc�\�t|t�r|j|�ddk\StSr�r�r�s  r�__ge__zName.__ge__(r�rc�\�t|t�r|j|�ddkDStSr�r�r�s  r�__gt__zName.__gt__.r�rc�.�d|j�zdzS)Nz
<DNS name �>)�__str__ras r�__repr__z
Name.__repr__4s���d�l�l�n�,�s�2�2rc�$�|jd�S)NF)�to_textras rr�zName.__str__7s���|�|�E�"�"r�omit_final_dotc�(�t|j�dk(ryt|j�dk(r|jddk(ry|r |j�r|jdd}n|j}djt	t
|��}|S)z�Convert name to DNS text format.

        *omit_final_dot* is a ``bool``.  If True, don't emit the final
        dot (denoting the root label) for absolute names.  The default
        is False.

        Returns a ``str``.
        r�@rr�.Nr�)r�r�r��join�mapr])rBr�r��ss    rr�zName.to_text:s|���t�{�{��q� ���t�{�{��q� �T�[�[��^�s�%:���d�.�.�0����C�R� �A����A��H�H�S��A�&�'���r�
idna_codecc�\�t|j�dk(ryt|j�dk(r|jddk(ry|r |j�r|jdd}n|j}|�t}dj	|D�cgc]}|j|���c}�Scc}w)atConvert name to Unicode text format.

        IDN ACE labels are converted to Unicode.

        *omit_final_dot* is a ``bool``.  If True, don't emit the final
        dot (denoting the root label) for absolute names.  The default
        is False.
        *idna_codec* specifies the IDNA encoder/decoder.  If None, the
        dns.name.IDNA_2003_Practical encoder/decoder is used.
        The IDNA_2003_Practical decoder does
        not impose any policy, it just decodes punycode, so if you
        don't want checking for compliance, you can use this decoder
        for IDNA2008 as well.

        Returns a ``str``.
        rr�rrr�Nr�)r�r�r��IDNA_2003_Practicalr�rm)rBr�r�r�r�s     r�
to_unicodezName.to_unicodeOs���(�t�{�{��q� ���t�{�{��q� �T�[�[��^�s�%:���d�.�.�0����C�R� �A����A���,�J��x�x�q�9�!��*�*�1�-�9�:�:��9s�
B)�originc�4�|j|d��}|�J�|S)a@Convert name to a format suitable for digesting in hashes.

        The name is canonicalized and converted to uncompressed wire
        format.  All names in wire format are absolute.  If the name
        is a relative name, then an origin must be supplied.

        *origin* is a ``dns.name.Name`` or ``None``.  If the name is
        relative and origin is not ``None``, then origin will be appended
        to the name.

        Raises ``dns.name.NeedAbsoluteNameOrOrigin`` if the name is
        relative and no origin was provided.

        Returns a ``bytes``.
        T)r�r�)�to_wire)rBr��digests   r�
to_digestablezName.to_digestableos'��"���V�$��?���!�!�!��
r�file�compressr�c�`�|��t�}|jD]7}|jt|��|r||j	�z
}�3||z
}�9|j�s^|�|j�st�|jD]7}|jt|��|r||j	�z
}�3||z
}�9t|�S|j�sR|�|j�st�t|j�}|jt|j��n|j}d}|D]�}t||d�}	|dz
}|�|j|	�}
nd}
|
�.d|
z}tjd|�}|j|�y|�(t|	�dkDr|j�}
|
dkr|
||	<t|�}
|jtjd|
��|
dkDs��|r |j|j	����|j|���y)aConvert name to wire format, possibly compressing it.

        *file* is the file where the name is emitted (typically an
        io.BytesIO file).  If ``None`` (the default), a ``bytes``
        containing the wire name will be returned.

        *compress*, a ``dict``, is the compression table to use.  If
        ``None`` (the default), names will not be compressed.  Note that
        the compression code assumes that compression offset 0 is the
        start of *file*, and thus compression will not be correct
        if this is not the case.

        *origin* is a ``dns.name.Name`` or ``None``.  If the name is
        relative and origin is not ``None``, then *origin* will be appended
        to it.

        *canonicalize*, a ``bool``, indicates whether the name should
        be canonicalized; that is, converted to a format suitable for
        digesting in hashes.

        Raises ``dns.name.NeedAbsoluteNameOrOrigin`` if the name is
        relative and no origin was provided.

        Returns a ``bytes`` or ``None``.
        Nrri�z!Hi�?�!B)�	bytearrayr��appendr�rcr�r0rU�list�extendr�get�struct�pack�write�tell)rBr�r�r�r��outrLr�r��n�pos�valuer�r�s              rr�zName.to_wire�s���B�<��+�C����
!���
�
�3�u�:�&���5�;�;�=�(�C��5�L�C�
!��#�#�%��>��);�);�)=�2�2�#�]�]�%�E��J�J�s�5�z�*�#��u�{�{�}�,���u���%���:�����!��~�V�%7�%7�%9�.�.��$�+�+�&�F��M�M�$�v�}�}�-�.��[�[�F�
���	*�E��V�A�B�Z� �A�
��F�A��#��l�l�1�o�����������K�K��e�,���
�
�1�
����'�C��F�Q�J��)�)�+�C��f�}�&)������J���
�
�6�;�;�t�Q�/�0��q�5�#��
�
�5�;�;�=�1��
�
�5�)�/	*�0rc�,�t|j�S)zIThe length of the name (in labels).

        Returns an ``int``.
        r�ras r�__len__zName.__len__�s���4�;�;��rc� �|j|Srr�)rB�indexs  r�__getitem__zName.__getitem__�s���{�{�5�!�!rc�$�|j|�Sr)�concatenater�s  r�__add__zName.__add__�s������&�&rc�$�|j|�Sr)�
relativizer�s  r�__sub__zName.__sub__�s�����u�%�%r�depth)rrc��t|j�}|dk(r|tjjfS||k(rtjj|fS|dks||kDrtd��t
|d|�t
||d�fS)a(Split a name into a prefix and suffix names at the specified depth.

        *depth* is an ``int`` specifying the number of labels in the suffix

        Raises ``ValueError`` if *depth* was not >= 0 and <= the length of the
        name.

        Returns the tuple ``(prefix, suffix)``.
        rz0depth must be >= 0 and <= the length of the nameN)r�r��dns�name�emptyr�r)rBrr�s   r�splitz
Name.split�s���
�������A�:��#�(�(�.�.�)�)�
�a�Z��H�H�N�N�D�)�)�
�Q�Y�%�!�)��O�P�P��T�'�E�6�]�#�T�$��v�w�-�%8�9�9rc���|j�rt|�dkDrt�t|j�}|jt|j��t
|�S)z�Return a new name which is the concatenation of self and other.

        Raises ``dns.name.AbsoluteConcatenation`` if the name is
        absolute and *other* is not the empty name.

        Returns a ``dns.name.Name``.
        r)r�r�r7rr�rr)rBr�r�s   rrzName.concatenatesM������#�e�*�q�.�'�'��d�k�k�"���
�
�d�5�<�<�(�)��F�|�rc�\�|�)|j|�rt|dt|��S|S)a�If the name is a subdomain of *origin*, return a new name which is
        the name relative to origin.  Otherwise return the name.

        For example, relativizing ``www.dnspython.org.`` to origin
        ``dnspython.org.`` returns the name ``www``.  Relativizing ``example.``
        to origin ``dnspython.org.`` returns ``example.``.

        Returns a ``dns.name.Name``.
        N)r�rr��rBr�s  rrzName.relativizes4����$�"3�"3�F�";���^��F��|�,�-�-��Krc�H�|j�s|j|�S|S)a�If the name is a relative name, return a new name which is the
        concatenation of the name and origin.  Otherwise return the name.

        For example, derelativizing ``www`` to origin ``dnspython.org.``
        returns the name ``www.dnspython.org.``.  Derelativizing ``example.``
        to origin ``dnspython.org.`` returns ``example.``.

        Returns a ``dns.name.Name``.
        )r�rrs  r�derelativizezName.derelativizes&�����!��#�#�F�+�+��Krrc�R�|r$|r|j|�S|j|�S|S)a8Return a name with the relativity desired by the caller.

        If *origin* is ``None``, then the name is returned.
        Otherwise, if *relativize* is ``True`` the name is
        relativized, and if *relativize* is ``False`` the name is
        derelativized.

        Returns a ``dns.name.Name``.
        )rr )rBr�rs   r�choose_relativityzName.choose_relativity/s/�������v�.�.��(�(��0�0��Krc�b�|tk(s	|tk(rt�t|jdd�S)aReturn the parent of the name.

        For example, the parent of ``www.dnspython.org.`` is ``dnspython.org``.

        Raises ``dns.name.NoParent`` if the name is either the root name or the
        empty name, and thus has no parent.

        Returns a ``dns.name.Name``.
        rN)�rootrr9rr�ras r�parentzName.parentDs+���4�<�4�5�=��N��D�K�K���O�$�$r�	prefix_okc�&�tt|||�S)a�Return the maximal predecessor of *name* in the DNSSEC ordering in the zone
        whose origin is *origin*, or return the longest name under *origin* if the
        name is origin (i.e. wrap around to the longest name, which may still be
        *origin* due to length considerations.

        The relativity of the name is preserved, so if this name is relative
        then the method will return a relative name, and likewise if this name
        is absolute then the predecessor will be absolute.

        *prefix_ok* indicates if prefixing labels is allowed, and
        defaults to ``True``.  Normally it is good to allow this, but if computing
        a maximal predecessor at a zone cut point then ``False`` must be specified.
        )�_handle_relativity_and_call�_absolute_predecessor�rBr�r&s   r�predecessorzName.predecessorSs��+�!�4���
�	
rc�&�tt|||�S)a;Return the minimal successor of *name* in the DNSSEC ordering in the zone
        whose origin is *origin*, or return *origin* if the successor cannot be
        computed due to name length limitations.

        Note that *origin* is returned in the "too long" cases because wrapping
        around to the origin is how NSEC records express "end of the zone".

        The relativity of the name is preserved, so if this name is relative
        then the method will return a relative name, and likewise if this name
        is absolute then the successor will be absolute.

        *prefix_ok* indicates if prefixing a new minimal label is allowed, and
        defaults to ``True``.  Normally it is good to allow this, but if computing
        a minimal successor at a zone cut point then ``False`` must be specified.
        )r(�_absolute_successorr*s   r�	successorzName.successores�� +�+>��f�i�X�Xr)rMrr})FNr)NNNF)r�rrMr)r�rrMr)NT)T)6rrrr�	__slots__rr	rUrrrAr�r�r�r�rqr�r��intr�rr
r�r�r�r�r�r�r�r�r�r�r�r�r�rr_r�r�r�CompressTyper�rrrrrrrr r"r%r+r.rHrIs@rrres2�����
�I�&�x��e�S�j�(9�:�&�!�6�'�&�?�T�?�?��?�
�#�
�J*��J*�E�,��S�2H�,I�J*�X�&��T���F��t��6���"�"�"�"�3�#��d��s��,OS�;�"�;�8@��8K�;�	�;�@�H�V�$4����.#�+/�#'�"�U��s�m�U��<�(�U��� �	U�
�U�
�%��
U�n �� �"�'�&�:�3�:�5��#8�:�(
�� �"CG���v�&��;?��	��*
%�
�&�
�T�
�V�
�$Y��Y�4�Y�6�YrrrZr�r�c�x�t|t�std��|�t|t�std��g}d}d}d}d}|�t}|dk(rd}|�r |dvrtdg�S|D]�}|rs|dk(r)|j�rt
|�}|d	z
}�+||z
}d}�3|j�st�|d
z}|t
|�z
}|d	z
}|dk(s�gd}|t|�z
}�x|dvr7t|�dk(rt�|j|j|��d}��|dk(rd
}d}d}��||z
}��|rt�t|�dkDr!|j|j|��n|jd�t|�dk(s|ddk7r&|�$|jt|j��t|�S)a�Convert unicode text into a Name object.

    Labels are encoded in IDN ACE form according to rules specified by
    the IDNA codec.

    *text*, a ``str``, is the text to convert into a name.

    *origin*, a ``dns.name.Name``, specifies the origin to
    append to non-absolute names.  The default is the root name.

    *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA
    encoder/decoder.  If ``None``, the default IDNA 2003 encoder/decoder
    is used.

    Returns a ``dns.name.Name``.
    z0input to from_unicode() must be a unicode string�origin must be a Name or NonerOFrr�)r�u。u.u。rr�
rrPTr�)rTrrr�r�	IDNA_2003�isdigitr0r*rWr�r'r�rirrr�)	rZr�r�r�rL�escaping�edigitsr�r[s	         r�from_unicoder9s���(�d�C� ��K�L�L��N�j���6��8�9�9�
�F��E��H��G�
�E����
��s�{�����6�6����;���	�A���a�<��y�y�{� #�A����1�����
��#(���9�9�;�'���R�K�E��S��V�O�E��q�L�G��!�|�#(����U��+���9�9��u�:��?�$�$��
�
�j�/�/��6�7����d����������
��9	�:��O��u�:��>��M�M�*�+�+�E�2�3��M�M�#���F��q��F�2�J�#�-�6�3E��
�
�d�6�=�=�)�*���<�rc�2�|D]}t|�dkDs�yy)NrRFT)rY)rZr[s  rr�r��s$��
����q�6�D�=���rc���t|t�r)t|�s
t|||�S|j	d�}t|t
�st
d��|�t|t�st
d��g}d}d}d}d}|dk(rd}|�r%|dk(rtdg�S|D]�}tjd	|�}	|r~|dk(r)|	j�rt|	�}|d
z
}�A||	z
}d}�I|	j�st�|dz}|t|	�z
}|d
z
}|dk(s�}d}|tjd	|�z
}��|	dk(r(t|�dk(rt�|j|�d}��|	d
k(rd}d}d}��||	z
}��|rt�t|�dkDr|j|�n|jd�t|�dk(s|ddk7r&|�$|j!t#|j$��t|�S)a�Convert text into a Name object.

    *text*, a ``bytes`` or ``str``, is the text to convert into a name.

    *origin*, a ``dns.name.Name``, specifies the origin to
    append to non-absolute names.  The default is the root name.

    *idna_codec*, a ``dns.name.IDNACodec``, specifies the IDNA
    encoder/decoder.  If ``None``, the default IDNA 2003 encoder/decoder
    is used.

    Returns a ``dns.name.Name``.
    r�z%input to from_text() must be a stringr3rFr�@�.r�rr4r�\Tr�)rTrrr�r9rirUr�rrrr6r0r*r�r'r�rrr�)
rZr�r�r�rLr7r8r�r[�byte_s
          r�	from_textr@�s���&�$����D�!���f�j�9�9��{�{�7�#���d�E�"��@�A�A��N�j���6��8�9�9�
�F��E��H��G�
�E��t�|�����4�<����;���	�A��K�K��a�(�E���a�<��}�}�� #�E�
���1�������#(�� �=�=�?�'���R�K�E��S��Z�'�E��q�L�G��!�|�#(������T�5�!9�9���$���u�:��?�$�$��
�
�e�$����%������������;	�<��O��u�:��>��M�M�%� ��M�M�#���F��q��F�2�J�#�-�6�3E��
�
�d�6�=�=�)�*���<�r�parserzdns.wire.Parserc���g}|j}|j�5|j�}|dk7r|dkr!|j|j	|��nC|dk\r8|dzdz|j�z}||k\rt
�|}|j
|�nt�|j�}|dk7r�|jd�ddd�t|�S#1swYt|�SxYw)a7Convert possibly compressed wire format into a Name.

    *parser* is a dns.wire.Parser.

    Raises ``dns.name.BadPointer`` if a compression pointer did not
    point backwards in the message.

    Raises ``dns.name.BadLabelType`` if an invalid label type was encountered.

    Returns a ``dns.name.Name``
    r�@�r��rN)	�current�restore_furthest�	get_uint8r��	get_bytesr,�seekr.r)rAr��biggest_pointer�countrFs     r�from_wire_parserrM-s����F��n�n�O�	�	 �	 �	"��� � �"���q�j��r�z��
�
�f�.�.�u�5�6��#�� �4�<�3�.��1A�1A�1C�C���o�-�$�$�")�����G�$�"�"��$�$�&�E��q�j�	�
�
�c�����<�����<��s�BC�4C�C+�messagerFc��t|t�std��tjj||�}t
|�}||j|z
fS)a^Convert possibly compressed wire format into a Name.

    *message* is a ``bytes`` containing an entire DNS message in DNS
    wire form.

    *current*, an ``int``, is the offset of the beginning of the name
    from the start of the message

    Raises ``dns.name.BadPointer`` if a compression pointer did not
    point backwards in the message.

    Raises ``dns.name.BadLabelType`` if an invalid label type was encountered.

    Returns a ``(dns.name.Name, int)`` tuple consisting of the name
    that was read and the number of bytes of the wire format message
    which were consumed reading it.
    z*input to from_wire() must be a byte string)rTrUr�r�wire�ParserrMrF)rNrFrArs    r�	from_wirerRNsL��&�g�u�%��E�F�F�
�X�X�_�_�W�g�
.�F��F�#�D��&�.�.�7�*�+�+r���r��[c�2�tjd�|d�S)Nc�$�|t|�zdzS)Nr)r�)�vr�s  r�<lambda>z_wire_length.<locals>.<lambda>ts���S��V��a��rr)�	functools�reducer�s r�_wire_lengthr\ss�����7���C�Crc�:�dt|j�z
}g}|dkDr#|jtdz�|dz}|dkDr�#|dk\r|jt|dz
z�t	t|��}|j
|j�t|�S)Nr�rCr�rr)r\r�r��_MAXIMAL_OCTETr�reversedrr)r�needed�
new_labelss   r�_pad_to_max_namerbws���
�<����,�
,�F��J�
�2�+����.�2�-�.��"����2�+���{����.�F�Q�J�7�8��h�z�*�+�J����d�k�k�"��
��rc��t|�}dt|�z
|z
dz
}|dkr|Std|z
|�}|t|zzS)Nr�rrr�)r�r\�minr^)rL�
suffix_labels�length�	remainingr`s     r�_pad_to_max_labelrh�sP��
��Z�F��l�=�1�1�F�:�Q�>�I��A�~���
��f��i�
(�F��>�F�*�*�*rrr&c��||k(rt|�S|d}|tk(r|j�S|d}|jdd}|tk(r|ddg}nBt|�}|d}|tk(rt}n|dz}||d<t|�}t||�g}|j|�t|�}|rt|�S|S)Nrr�r)rb�_MINIMAL_OCTETr%r��_MINIMAL_OCTET_VALUEr��_LEFT_SQUARE_BRACKET_VALUE�_AT_SIGN_VALUErUrhrr)	rr�r&�least_significant_label�least_octetrera�octets�octets	         rr)r)�s����v�~���%�%�"�1�g���.�0��{�{�}��)�"�-�K��K�K���O�M��*�*�-�c�r�2�3�
��2�3���r�
���.�.�"�E��Q�J�E���r�
�"'��-��'�(?��O�P�
����m�$��
��D����%�%��rc��|r	tj|�S||k7r�|d}t|�dkrH|tzg}|j|jdd�	tjj|�St|�}tt|�dz
dd�D]g}||}|tk(r�|tk(rt}n|dz
}|||<t|d|dz�g}|j|jdd�t|�cS|j!�}||k7r��|S#t$rY��wxYw#tjj$rY��wxYw)Nrr�rr�)�_SUCCESSOR_PREFIXrr2r�rjrr�rrrr��range�_MAXIMAL_OCTET_VALUErmrlrUr%)rr�r&rnrarpr�rqs        rr-r-�so���	�$�0�0��6�6��&�.�"&�q�'���&�'�"�,�2�N�B�C�J����d�k�k�!�"�o�.�
��x�x�}�}�Z�0�0�
�2�3���s�6�{�Q���B�/�	$�A��1�I�E��,�,����&�2����
���F�1�I���w��Q���0�1�J����d�k�k�!�"�o�.��
�#�#�+	$�0�{�{�}��W�&�.�^�M��c�	��	���8�8�'�'�
��
�s#�D�D/�	D,�+D,�/E�E�functionc���|j�st�|j�}|r|j|�}n|j|�st�||||�}|r|j|�}|Sr)r�r0r r�rKr)rvrr�r&�relative�result_names      rr(r(�su������&�&��#�#�%�%�H��� � ��(��
�
�
�v�
&�#�#��4���3�K��!�,�,�V�4���r)arr��encodings.idnarxrZr�typingrrrrrrr	�
dns._featuresr�dns.enum�
dns.exception�
dns.immutable�dns.wire�	_features�haver
r�r0r1�enum�IntEnumr
r �
NAMERELN_NONEr!�NAMERELN_SUPERDOMAINr"�NAMERELN_SUBDOMAINr#�NAMERELN_EQUALr�NAMERELN_COMMONANCESTOR�	exception�SyntaxErrorr'r*�	FormErrorr,r.�DNSExceptionr0r2r5r7r9r;r=rKrVrXrUrrr]r_rtr�r��IDNA_2003_Strictr5�IDNA_2008_Practical�IDNA_2008_UTS_46�IDNA_2008_Strict�IDNA_2008_Transitional�	IDNA_2008r�r��	immutablerr$rr9rqr�r@rMrRrjrYrkrsr^rurmrlr\rbrhr)r-r(r%rr�<module>r�s���$����
�H�H�H�������=�=���f����N��N��F�C�K� ���3�8�8�#�#��6�!�!�
�#�/�/��!�+�+���#�#��&�5�5�� ����*�*� �C��
�
�)�)�C�H����(�(�H�=�3�=�=�*�*�=�D�s�}�}�9�9�D�
+�#�-�-�)�)�+�+�3�=�=�,�,�+�+�C�M�M�6�6�+�
�s�}�}�)�)��
����+�+��
	*�C�M�M�.�.�	*�Y�C�M�M�6�6�Y����
��U�5�#�:�&��3��:$�$�0!2�I�!2�HG2�I�G2�T$�E�*�� ��&���	�#�D�%��u�=�� ��u�e�U�;�� ���u�d�;��&�t�T�5�%�@���	��U�5�#�:�.��4��<
�E�%��*�$5�
�%�
������OY�OY��OY�f�S�E�{��	
�R���)-�PT�J�

�J���~�J�:B�9�:M�J�	�J�Z�s��t��"�&*�T�
��s�
�
�T��T�N�T���#�T�
�	T�t�.��4��B,�u�,�s�,�u�T�3�Y�/?�,�8���>�*���.�)�*�����>�*���S��� ��X��D�
� +����d��t����B;�d�;�D�;�T�;�d�;�|���d�D�)�4�/�0��
��
���	�

�r

Zerion Mini Shell 1.0