%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/
Upload File :
Create Path :
Current File : //proc/self/root/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyc

�
�ac@s�dZddlmZddlZddlZddlZddlZyddlZe	Z
Wnek
rueZ
nXddl
ZddlZddlmZmZmZmZmZy
ejZWn0ek
r�ddejd�>ddZnXd	ZdZdZd
ZdZdejjfd
��YZ dejjfd��YZ!dejj"fd��YZ#dejj"fd��YZ$dejj%fd��YZ&dejj"fd��YZ'dejjfd��YZ(dejj%fd��YZ)dejj%fd��YZ*dejj%fd��YZ+d ejj%fd!��YZ,d"e-fd#��YZ.d$e.fd%��YZ/d&e.fd'��YZ0e1d(�Z2e/e�Z3e/e	�Z4e3Z5e0e	ee	e�Z6e0e	eee�Z7e0eeee	�Z8e0e	e	ee�Z9e6Z:ed)�Z;d*�Z<d+�Z=d,e-fd-��YZ>e>d.g�Z?e>g�Z@e?eAd/�ZBe?eAd0�ZCd1�ZDdS(2sDNS Names.
i����(tBytesIONi(tlongtbinary_typet	text_typetunichrtmaybe_decodeitPiiiit
EmptyLabelcBseZdZRS(sA DNS label is empty.(t__name__t
__module__t__doc__(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR9st	BadEscapecBseZdZRS(s8An escaped code in a text format of DNS name is invalid.(RR	R
(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR=st
BadPointercBseZdZRS(s=A DNS compression pointer points forward instead of backward.(RR	R
(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyRAstBadLabelTypecBseZdZRS(s2The label type in DNS name wire format is unknown.(RR	R
(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR
EstNeedAbsoluteNameOrOrigincBseZdZRS(svAn attempt was made to convert a non-absolute name to
    wire when there was also a non-absolute (or missing) origin.(RR	R
(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyRIstNameTooLongcBseZdZRS(s A DNS name is > 255 octets long.(RR	R
(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyRNstLabelTooLongcBseZdZRS(s A DNS label is > 63 octets long.(RR	R
(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyRRstAbsoluteConcatenationcBseZdZRS(s]An attempt was made to append anything other than the
    empty name to an absolute DNS name.(RR	R
(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyRVstNoParentcBseZdZRS(sMAn attempt was made to get the parent of the root name
    or the empty name.(RR	R
(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR[st
NoIDNA2008cBseZdZRS(sLIDNA 2008 processing was requested but the idna module is not
    available.(RR	R
(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR_st
IDNAExceptioncBseZdZdhZdZRS(s$IDNA processing raised an exception.tidna_exceptions+IDNA processing exception: {idna_exception}(RR	R
tsupp_kwargstfmt(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyRds	t	IDNACodeccBs)eZdZd�Zd�Zd�ZRS(s.Abstract base class for IDNA encoder/decoders.cCsdS(N((tself((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__init__nscCs
t�dS(N(tNotImplementedError(Rtlabel((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytencodeqscCss|j�}|jd�rZy|djd�}Wqftk
rV}td|��qfXnt|�}t|t�S(Nsxn--itpunycodeR(tlowert
startswithtdecodet	ExceptionRRt	_escapifytTrue(RRt	downcasedte((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR!ts(RR	R
RRR!(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyRks		t
IDNA2003CodeccBs,eZdZed�Zd�Zd�ZRS(sIDNA 2003 encoder/decoder.cCs tt|�j�||_dS(s�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(tsuperR'Rt
strict_decode(RR)((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR�scCsB|dkrdSytjj|�SWntk
r=t�nXdS(sEncode *label*.tN(t	encodingstidnatToASCIItUnicodeErrorR(RR((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR�s
cCsu|jstt|�j|�S|dkr/dSyttjj|�t�SWn"t	k
rp}t
d|��nXdS(sDecode *label*.R*uRN(R)R(R'R!R#R+R,t	ToUnicodeR$R"R(RRR&((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR!�s	(RR	R
tFalseRRR!(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR'�s	
t
IDNA2008CodeccBs>eZdZeeeed�Zd�Zd�Zd�ZRS(s�IDNA 2008 encoder/decoder.

        *uts_46* is a ``bool``.  If True, apply Unicode IDNA
        compatibility processing as described in Unicode Technical
        Standard #46 (http://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.
        cCs;tt|�j�||_||_||_||_dS(s)Initialize the IDNA 2008 encoder/decoder.N(R(R1Rtuts_46ttransitionaltallow_pure_asciiR)(RR2R3R4R)((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR�s
			cCs+x$|D]}t|�dkrtSqWtS(Ni(tordR0R$(RRtc((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytis_all_ascii�s
cCs�|dkrdS|jr5|j|�r5|jd�StsDt�ny5|jrktj|t|j	�}ntj
|�SWn%tjk
r�}td|��nXdS(NR*tasciiR(
R4R7Rthave_idna_2008RR2R,tuts46_remapR0R3talabelt	IDNAErrorR(RRR&((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR�s
		cCs�|jstt|�j|�S|dkr/dSts>t�ny;|jrbtj|t	t	�}nt
tj|�t�SWn%tj
k
r�}td|��nXdS(NR*uR(R)R(R1R!R9RR2R,R:R0R#tulabelR$R<R(RRR&((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR!�s			(RR	R
R0RR7RR!(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR1�s		s"().;\@$cCs2|s�d}t|t�r*|j�}nxpt|�D]b}|tkr`|dt|�7}q7|dkr�|dkr�|t|�7}q7|d|7}q7W|j�Sd}t|t�r�|j�}nx`|D]X}|dkr�|dkr�||7}q�|dkr||7}q�|d	t|�7}q�W|S(
s�Escape the characters in label which need it.
    @param unicode_mode: escapify only special and whitespace (<= 0x20)
    characters
    @returns: the escaped string
    @rtype: stringR*s\i is\%03duu uu\%03d(	t
isinstanceRRt	bytearrayt_escapedtchrRR!R5(Rtunicode_modettextR6((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR#�s*



cCs�t|�}d}d}d}xh|D]`}t|�}||d7}|dkrZt�n|dkr{|dkr{|}n|d7}q%W|dkr�t�n|dkr�||dkr�t�ndS(sXCheck 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

    ii����ii?R*i�N(tlenRRR(tlabelstlttotaltitjRtll((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt_validate_labelss 
			cCs6t|t�r|St|t�r,|j�St�dS(sfIf label is ``text``, convert it to ``binary``.  If it is already
    ``binary`` just return it.

    N(R>RRRt
ValueError(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt_maybe_convert_to_binary1s

tNamecBsmeZdZdgZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zed�Zed%d�Zd%d�Zd%d%d%d�Zd�Zd�Z d�Z!d�Z"d�Z#d �Z$d!�Z%d"�Z&d%e'd#�Z(d$�Z)RS(&s�A DNS name.

    The dns.name.Name class represents a DNS name as a tuple of
    labels.  Each label is a `binary` in DNS wire format.  Instances
    of the class are immutable.
    REcCsOg|D]}t|�^q}tt|�jdt|��t|j�dS(sJ*labels* is any iterable whose values are ``text`` or ``binary``.
        REN(RMR(RNt__setattr__ttupleRKRE(RREtx((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyRIscCstd��dS(Ns+object doesn't support attribute assignment(t	TypeError(Rtnametvalue((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyROQscCs
t|j�S(N(RNRE(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__copy__UscCsttj|j|��S(N(RNtcopytdeepcopyRE(Rtmemo((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__deepcopy__XscCsi|jd6S(NRE(RE(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__getstate__[scCs.tt|�jd|d�t|j�dS(NRE(R(RNRORKRE(Rtstate((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__setstate___scCs&t|j�dko%|jddkS(s`Is the most significant label of this name the root label?

        Returns a ``bool``.
        ii����R*(RDRE(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytis_absolutecscCs&t|j�dko%|jddkS(sdIs this name wild?  (I.e. Is the least significant label '*'?)

        Returns a ``bool``.
        it*(RDRE(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytis_wildkscCs]td�}x@|jD]5}x,t|j��D]}||d>|7}q/WqWt|t�S(sQReturn a case-insensitive hash of the name.

        Returns an ``int``.
        ii(RRER?Rtinttmaxint(RthRR6((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__hash__ss
c
Cs�|j�}|j�}||krG|r7tddfStddfSnt|j�}t|j�}||}|dkr�|}n|}d}d}	t}
x�|dkrd|d8}|d8}|d8}|j|j�}|j|j�}||kr#d}|	dkrt}
n|
||	fS||krWd}|	dkrJt}
n|
||	fS|	d7}	q�W|}|dkr�t}
n|dkr�t}
nt}
|
||	fS(s�Compare two names, returning a 3-tuple
        ``(relation, order, nlabels)``.

        *relation* describes the relation ship between the names,
        and is one of: ``dns.name.NAMERELN_NONE``,
        ``dns.name.NAMERELN_SUPERDOMAIN``, ``dns.name.NAMERELN_SUBDOMAIN``,
        ``dns.name.NAMERELN_EQUAL``, or ``dns.name.NAMERELN_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
        =============  =============  ===========  =====  =======
        iii����(	R]t
NAMERELN_NONERDRERtNAMERELN_COMMONANCESTORtNAMERELN_SUPERDOMAINtNAMERELN_SUBDOMAINtNAMERELN_EQUAL(
Rtothertsabstoabstl1tl2tldiffRFtordertnlabelstnamerelntlabel1tlabel2((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytfullcomparesN 

	


	
	
		cCs8|j|�\}}}|tks0|tkr4tStS(s�Is self a subdomain of other?

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

        Returns a ``bool``.
        (RtRgRhR$R0(RRitnrtotnl((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytis_subdomain�s	cCs8|j|�\}}}|tks0|tkr4tStS(s�Is self a superdomain of other?

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

        Returns a ``bool``.
        (RtRfRhR$R0(RRiRuRvRw((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytis_superdomain�s	cCs&tg|jD]}|j�^q
�S(scReturn a name which is equal to the current name, but is in
        DNSSEC canonical form.
        (RNRER(RRQ((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytcanonicalize�scCs.t|t�r&|j|�ddkStSdS(Nii(R>RNRtR0(RRi((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__eq__�scCs.t|t�r&|j|�ddkStSdS(Nii(R>RNRtR$(RRi((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__ne__�scCs.t|t�r&|j|�ddkStSdS(Nii(R>RNRttNotImplemented(RRi((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__lt__�scCs.t|t�r&|j|�ddkStSdS(Nii(R>RNRtR}(RRi((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__le__scCs.t|t�r&|j|�ddkStSdS(Nii(R>RNRtR}(RRi((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__ge__scCs.t|t�r&|j|�ddkStSdS(Nii(R>RNRtR}(RRi((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__gt__scCsd|j�dS(Ns
<DNS name t>(t__str__(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__repr__scCs
|jt�S(N(tto_textR0(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR�scCs�t|j�dkrtd�St|j�dkrQ|jddkrQtd�S|rs|j�rs|jd }n	|j}djtt|��}t|�S(s�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 ``text``.
        it@iR*t.i����(RDRERR]tjointmapR#(Rtomit_final_dotRFts((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR�s

(
	cCs�t|j�dkrdSt|j�dkrE|jddkrEdS|rg|j�rg|jd }n	|j}|dkr�t}ndjg|D]}|j|�^q��S(suConvert 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 ``text``.
        iu@iR*u.i����N(RDRER]tNonetIDNA_2003_PracticalR�R!(RR�t
idna_codecRFRQ((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt
to_unicode-s(		cCs�|j�sV|dks%|j�r.t�nt|j�}|jt|j��n	|j}g|D]1}tjdt|�t|�|j	��^qf}dj
|�S(sAConvert 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 ``binary``.
        s!B%dsR*N(R]R�RtlistREtextendtstructtpackRDRR�(RtoriginRERQtdlabels((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt
to_digestableKs		;c
Cs�|dkrt�}t}nt}|j�sz|dksI|j�rRt�nt|j�}|jt|j��n	|j}d}x|D]}t	||�}|d7}|dk	r�|j
|�}	nd}	|	dk	r
d|	}
tjd|
�}|j
|�Pq�|dk	rSt|�dkrS|j�}	|	dkrS|	||<qSnt|�}|j
tjd|��|dkr�|j
|�q�q�W|r�|j�SdS(s�Convert name to wire format, possibly compressing it.

        *file* is the file where the name is emitted (typically a
        BytesIO file).  If ``None`` (the default), a ``binary``
        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.

        *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.

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

        Returns a ``binary`` or ``None``.
        iii�s!Hi�?s!BN(R�RR$R0R]RR�RER�RNtgetR�R�twriteRDttelltgetvalue(
RtfiletcompressR�twant_returnRERHRtntposRTR�RF((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytto_wiregs@				



cCs
t|j�S(sIThe length of the name (in labels).

        Returns an ``int``.
        (RDRE(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__len__�scCs|j|S(N(RE(Rtindex((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__getitem__�scCs
|j|�S(N(tconcatenate(RRi((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__add__�scCs
|j|�S(N(t
relativize(RRi((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt__sub__�scCs�t|j�}|dkr+|tjjfS||krGtjj|fS|dks_||krntd��nt|| �t||�fS(s(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)``.
        is0depth must be >= 0 and <= the length of the name(RDREtdnsRStemptyRLRN(RtdepthRF((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytsplit�scCsV|j�r't|�dkr't�nt|j�}|jt|j��t|�S(s�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``.
        i(R]RDRR�RER�RN(RRiRE((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR��s
		cCs8|dk	r0|j|�r0t|t|� �S|SdS(s�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�RxRNRD(RR�((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyR��scCs!|j�s|j|�S|SdS(s�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``.
        N(R]R�(RR�((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytderelativize�s
cCs1|r)|r|j|�S|j|�Sn|SdS(s8Return 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``.
        N(R�R�(RR�R�((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytchoose_relativity�s

cCs2|tks|tkr!t�nt|jd�S(sReturn 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``.
        i(trootR�RRNRE(R((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytparent	s	N(*RR	R
t	__slots__RRORURYRZR\R]R_RcRtRxRyRzR{R|R~RR�R�R�R�R0R�R�R�R�R�R�R�R�R�R�R�R�R�R$R�R�(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyRN>sJ											L											:								R*c	Cswt|t�std��n|dkp6t|t�sHtd��ng}d}t}d}d}|dkr{t}n|dkr�d}n|r&|dkr�tdg�Sx*|D]"}|rg|dkr|j�r�t|�}|d7}qd||7}t}q�|j�st	�n|d	9}|t|�7}|d7}|d
kr�t}|t
|�7}q�q�|dkr�t|�dkr�t�n|j
|j|��d}q�|dkr�t}d}d}q�||7}q�W|r�t	�nt|�dkr|j
|j|��q&|j
d�nt|�dksH|ddkrm|dk	rm|jt|j��nt|�S(s�Convert unicode text into a Name object.

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

    *text*, a ``text``, 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``.
    s0input to from_unicode() must be a unicode stringsorigin must be a Name or Noneuiu@u.R*ii
iu。u.u。u\i����N(u.u。u.u。(R>RRLR�RNR0t	IDNA_2003tisdigitR`RRRDRtappendRR$R�R�RE(	RCR�R�RERtescapingtedigitsRGR6((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pytfrom_unicodesd		



		

				.c
Cs�t|t�rt|||�St|t�s=td��n|d
kpUt|t�sgtd��ng}d}t}d}d}|dkr�d}n|r<|dkr�tdg�Sx?t|�D]1}t	j
d|�}	|r�|dkr(|	j�rt|	�}|d7}q�||	7}t}q�|	j�s=t
�n|d	9}|t|	�7}|d7}|d
kr�t}|t	j
d|�7}q�q�|	dkr�t|�dkr�t�n|j|�d}q�|	dkr�t}d}d}q�||	7}q�W|r
t
�nt|�dkr,|j|�q<|jd�nt|�dks^|ddkr�|d
k	r�|jt|j��nt|�S(s�Convert text into a Name object.

    *text*, a ``text``, 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``.
    s%input to from_text() must be a stringsorigin must be a Name or NoneR*iR�R�s!Bii
is\i����N(R>RR�RRLR�RNR0R?R�R�R�R`RRDRR�R$R�R�RE(
RCR�R�RERR�R�RGR6tbyte_((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt	from_textisf	


		

	
			.cCsrt|t�std��ntjj|�}g}|}d}||}|d7}d}x�|dkrT|dkr�|j||||!j��||7}|dkr$||7}q$ni|dkr|d@d||}|dkr�|d7}n||krt�n|}|d7}nt	�||}|d7}|dkr_|d7}q_q_W|jd�t
|�|fS(	s_Convert possibly compressed wire format into a Name.

    *message* is a ``binary`` 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.
    s*input to from_wire() must be a byte stringiii@i�i?iR*(R>RRLR�twiredatat
maybe_wrapR�tunwrapRR
RN(tmessagetcurrentREtbiggest_pointerthopstcounttcused((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt	from_wire�s<



	



(ER
tioRR�tsysRVtencodings.idnaR+R,R$R9tImportErrorR0t
dns.exceptionR�tdns.wiredatat_compatRRRRRRatAttributeErrortcalcsizeRdRfRgRhRet	exceptiontSyntaxErrorRRt	FormErrorRR
tDNSExceptionRRRRRRRtobjectRR'R1R?R@R�tIDNA_2003_StrictR�tIDNA_2008_PracticaltIDNA_2008_UTS_46tIDNA_2008_StricttIDNA_2008_Transitionalt	IDNA_2008R#RKRMRNR�R�R�R�R�R�(((s=/opt/plesk/python/2.7/lib/python2.7/site-packages/dns/name.pyt<module>sn


(

#$C 		
��KH

Zerion Mini Shell 1.0