GhostManSec
Server: Apache
System: Linux s323.xrea.com 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User: moonarc (17751)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //usr/lib/python2.7/site-packages/dns/name.pyc
�
���Wc@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(2s�DNS Names.

@var root: The DNS root name.
@type root: dns.name.Name object
@var empty: The empty DNS name.
@type empty: dns.name.Name object
i����(tBytesIONi(tlongtbinary_typet	text_typetunichrtmaybe_decodeitPiiiit
EmptyLabelcBseZdZRS(sA DNS label is empty.(t__name__t
__module__t__doc__(((s,/usr/lib/python2.7/site-packages/dns/name.pyR4st	BadEscapecBseZdZRS(s8An escaped code in a text format of DNS name is invalid.(RR	R
(((s,/usr/lib/python2.7/site-packages/dns/name.pyR9st
BadPointercBseZdZRS(s=A DNS compression pointer points forward instead of backward.(RR	R
(((s,/usr/lib/python2.7/site-packages/dns/name.pyR>stBadLabelTypecBseZdZRS(s2The label type in DNS name wire format is unknown.(RR	R
(((s,/usr/lib/python2.7/site-packages/dns/name.pyR
CstNeedAbsoluteNameOrOrigincBseZdZRS(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,/usr/lib/python2.7/site-packages/dns/name.pyRHstNameTooLongcBseZdZRS(s A DNS name is > 255 octets long.(RR	R
(((s,/usr/lib/python2.7/site-packages/dns/name.pyRNstLabelTooLongcBseZdZRS(s A DNS label is > 63 octets long.(RR	R
(((s,/usr/lib/python2.7/site-packages/dns/name.pyRSstAbsoluteConcatenationcBseZdZRS(s]An attempt was made to append anything other than the
    empty name to an absolute DNS name.(RR	R
(((s,/usr/lib/python2.7/site-packages/dns/name.pyRXstNoParentcBseZdZRS(sMAn attempt was made to get the parent of the root name
    or the empty name.(RR	R
(((s,/usr/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,/usr/lib/python2.7/site-packages/dns/name.pyRcst
IDNAExceptioncBs#eZdZedg�ZdZRS(s$IDNA processing raised an exception.tidna_exceptions+IDNA processing exception: {idna_exception}(RR	R
tsettsupp_kwargstfmt(((s,/usr/lib/python2.7/site-packages/dns/name.pyRist	IDNACodeccBs)eZdZd�Zd�Zd�ZRS(s.Abstract base class for IDNA encoder/decoders.cCsdS(N((tself((s,/usr/lib/python2.7/site-packages/dns/name.pyt__init__tscCs
t�dS(N(tNotImplementedError(Rtlabel((s,/usr/lib/python2.7/site-packages/dns/name.pytencodewscCss|j�}|jd�rZy|djd�}Wqftk
rV}td|��qfXnt|�}t|t�S(Nsxn--itpunycodeR(tlowert
startswithtdecodet	ExceptionRRt	_escapifytTrue(RRt	downcasedte((s,/usr/lib/python2.7/site-packages/dns/name.pyR"zs(RR	R
RRR"(((s,/usr/lib/python2.7/site-packages/dns/name.pyRps		t
IDNA2003CodeccBs,eZdZed�Zd�Zd�ZRS(sIDNA 2003 encoder/decoder.cCs tt|�j�||_dS(sInitialize the IDNA 2003 encoder/decoder.
        @param strict_decode: If True, then IDNA2003 checking is done when
        decoding.  This can cause failures if the name was encoded with
        IDNA2008.  The default is False.
        @type strict_decode: bool
        N(tsuperR(Rt
strict_decode(RR*((s,/usr/lib/python2.7/site-packages/dns/name.pyR�scCsB|dkrdSytjj|�SWntk
r=t�nXdS(Nt(t	encodingstidnatToASCIItUnicodeErrorR(RR((s,/usr/lib/python2.7/site-packages/dns/name.pyR�s
cCsu|jstt|�j|�S|dkr/dSyttjj|�t�SWn"t	k
rp}t
d|��nXdS(NR+uR(R*R)R(R"R$R,R-t	ToUnicodeR%R#R(RRR'((s,/usr/lib/python2.7/site-packages/dns/name.pyR"�s	(RR	R
tFalseRRR"(((s,/usr/lib/python2.7/site-packages/dns/name.pyR(�s
	t
IDNA2008CodeccBs>eZdZeeeed�Zd�Zd�Zd�ZRS(sIDNA 2008 encoder/decoder.cCs;tt|�j�||_||_||_||_dS(s�Initialize the IDNA 2008 encoder/decoder.
        @param uts_46: If True, apply Unicode IDNA compatibility processing
        as described in Unicode Technical Standard #46
        (U{http://unicode.org/reports/tr46/}).  This parameter is only
        meaningful if IDNA 2008 is in use.  If False, do not apply
        the mapping.  The default is False
        @type uts_46: bool
        @param transitional: If True, use the "transitional" mode described
        in Unicode Technical Standard #46.  This parameter is only
        meaningful if IDNA 2008 is in use.  The default is False.
        @type transitional: bool
        @param allow_pure_ascii: 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
        suffixm which would otherwise be disallowed.  The default is False
        @type allow_pure_ascii: bool
        @param strict_decode: If True, then IDNA2008 checking is done when
        decoding.  This can cause failures if the name was encoded with
        IDNA2003.  The default is False.
        @type strict_decode: bool
        N(R)R2Rtuts_46ttransitionaltallow_pure_asciiR*(RR3R4R5R*((s,/usr/lib/python2.7/site-packages/dns/name.pyR�s
			cCs+x$|D]}t|�dkrtSqWtS(Ni(tordR1R%(RRtc((s,/usr/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(
R5R8Rthave_idna_2008RR3R-tuts46_remapR1R4talabelt	IDNAErrorR(RRR'((s,/usr/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)R2R"R:RR3R-R;R1R$tulabelR%R=R(RRR'((s,/usr/lib/python2.7/site-packages/dns/name.pyR"�s			(RR	R
R1RR8RR"(((s,/usr/lib/python2.7/site-packages/dns/name.pyR2�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"R6(Rtunicode_modettextR7((s,/usr/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(s/Check for empty labels in the middle of a label sequence,
    labels that are too long, and for too many labels.
    @raises NameTooLong: the name as a whole is too long
    @raises EmptyLabel: a label is empty (i.e. the root label) and appears
    in a position other than the end of the label sequenceii����ii?R+i�N(tlenRRR(tlabelstlttotaltitjRtll((s,/usr/lib/python2.7/site-packages/dns/name.pyt_validate_labelss 
			cCs6t|t�r|St|t�r,|j�St�dS(N(R?RRRt
ValueError(R((s,/usr/lib/python2.7/site-packages/dns/name.pyt
_ensure_bytes.s

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.
    Instances of the class are immutable.

    @ivar labels: The tuple of labels in the name. Each label is a string of
    up to 63 octets.RFcCsOg|D]}t|�^q}tt|�jdt|��t|j�dS(s�Initialize a domain name from a list of labels.
        @param labels: the labels
        @type labels: any iterable whose values are strings
        RFN(RNR)ROt__setattr__ttupleRLRF(RRFtx((s,/usr/lib/python2.7/site-packages/dns/name.pyRBscCstd��dS(Ns+object doesn't support attribute assignment(t	TypeError(Rtnametvalue((s,/usr/lib/python2.7/site-packages/dns/name.pyRPKscCs
t|j�S(N(RORF(R((s,/usr/lib/python2.7/site-packages/dns/name.pyt__copy__NscCsttj|j|��S(N(ROtcopytdeepcopyRF(Rtmemo((s,/usr/lib/python2.7/site-packages/dns/name.pyt__deepcopy__QscCsi|jd6S(NRF(RF(R((s,/usr/lib/python2.7/site-packages/dns/name.pyt__getstate__TscCs.tt|�jd|d�t|j�dS(NRF(R)RORPRLRF(Rtstate((s,/usr/lib/python2.7/site-packages/dns/name.pyt__setstate__WscCs&t|j�dko%|jddkS(sXIs the most significant label of this name the root label?
        @rtype: bool
        ii����R+(RERF(R((s,/usr/lib/python2.7/site-packages/dns/name.pytis_absolute[scCs&t|j�dko%|jddkS(s\Is this name wild?  (I.e. Is the least significant label '*'?)
        @rtype: bool
        it*(RERF(R((s,/usr/lib/python2.7/site-packages/dns/name.pytis_wildbscCs]td�}x@|jD]5}x,t|j��D]}||d>|7}q/WqWt|t�S(sHReturn a case-insensitive hash of the name.
        @rtype: int
        ii(RRFR@R tinttmaxint(RthRR7((s,/usr/lib/python2.7/site-packages/dns/name.pyt__hash__is
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).

        I{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

        I{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.

        I{nlabels} is the number of significant labels that the two names
        have in common.
        iii����(	R^t
NAMERELN_NONERERFR tNAMERELN_COMMONANCESTORtNAMERELN_SUPERDOMAINtNAMERELN_SUBDOMAINtNAMERELN_EQUAL(
Rtothertsabstoabstl1tl2tldiffRGtordertnlabelstnamerelntlabel1tlabel2((s,/usr/lib/python2.7/site-packages/dns/name.pytfullcomparetsN

	


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

        The notion of subdomain includes equality.
        @rtype: bool
        (RuRhRiR%R1(RRjtnrtotnl((s,/usr/lib/python2.7/site-packages/dns/name.pytis_subdomain�scCs8|j|�\}}}|tks0|tkr4tStS(sqIs self a superdomain of other?

        The notion of subdomain includes equality.
        @rtype: bool
        (RuRgRiR%R1(RRjRvRwRx((s,/usr/lib/python2.7/site-packages/dns/name.pytis_superdomain�scCs&tg|jD]}|j�^q
�S(s�Return a name which is equal to the current name, but is in
        DNSSEC canonical form.
        @rtype: dns.name.Name object
        (RORFR (RRR((s,/usr/lib/python2.7/site-packages/dns/name.pytcanonicalize�scCs.t|t�r&|j|�ddkStSdS(Nii(R?RORuR1(RRj((s,/usr/lib/python2.7/site-packages/dns/name.pyt__eq__�scCs.t|t�r&|j|�ddkStSdS(Nii(R?RORuR%(RRj((s,/usr/lib/python2.7/site-packages/dns/name.pyt__ne__�scCs.t|t�r&|j|�ddkStSdS(Nii(R?RORutNotImplemented(RRj((s,/usr/lib/python2.7/site-packages/dns/name.pyt__lt__�scCs.t|t�r&|j|�ddkStSdS(Nii(R?RORuR~(RRj((s,/usr/lib/python2.7/site-packages/dns/name.pyt__le__�scCs.t|t�r&|j|�ddkStSdS(Nii(R?RORuR~(RRj((s,/usr/lib/python2.7/site-packages/dns/name.pyt__ge__�scCs.t|t�r&|j|�ddkStSdS(Nii(R?RORuR~(RRj((s,/usr/lib/python2.7/site-packages/dns/name.pyt__gt__�scCsd|j�dS(Ns
<DNS name t>(t__str__(R((s,/usr/lib/python2.7/site-packages/dns/name.pyt__repr__�scCs
|jt�S(N(tto_textR1(R((s,/usr/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 text format.
        @param omit_final_dot: If True, don't emit the final dot (denoting the
        root label) for absolute names.  The default is False.
        @rtype: string
        it@iR+t.i����(RERFRR^tjointmapR$(Rtomit_final_dotRGts((s,/usr/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(s�Convert name to Unicode text format.

        IDN ACE labels are converted to Unicode.

        @param omit_final_dot: If True, don't emit the final dot (denoting the
        root label) for absolute names.  The default is False.
        @type omit_final_dot: bool
        @param idna_codec: IDNA encoder/decoder.  If None, the
        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.
        @type idna_codec: dns.name.IDNA
        @rtype: string
        iu@iR+u.i����N(RERFR^tNonetIDNA_2003_PracticalR�R"(RR�t
idna_codecRGRR((s,/usr/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(sConvert name to a format suitable for digesting in hashes.

        The name is canonicalized and converted to uncompressed wire format.

        @param origin: If the name is relative and origin is not None, then
        origin will be appended to it.
        @type origin: dns.name.Name object
        @raises NeedAbsoluteNameOrOrigin: All names in wire format are
        absolute.  If self is a relative name, then an origin must be supplied;
        if it is missing, then this exception is raised
        @rtype: string
        s!B%dsR+N(R^R�RtlistRFtextendtstructtpackRER R�(RtoriginRFRRtdlabels((s,/usr/lib/python2.7/site-packages/dns/name.pyt
to_digestable*s		;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.

        @param file: the file where the name is emitted (typically
        a BytesIO file).  If None, a string containing the wire name
        will be returned.
        @type file: file or None
        @param compress: The compression table.  If None (the default) names
        will not be compressed.
        @type compress: dict
        @param origin: If the name is relative and origin is not None, then
        origin will be appended to it.
        @type origin: dns.name.Name object
        @raises NeedAbsoluteNameOrOrigin: All names in wire format are
        absolute.  If self is a relative name, then an origin must be supplied;
        if it is missing, then this exception is raised
        iii�s!Hi�?s!BN(R�RR%R1R^RR�RFR�ROtgetR�R�twriteREttelltgetvalue(
RtfiletcompressR�twant_returnRFRIRtntposRUR�RG((s,/usr/lib/python2.7/site-packages/dns/name.pytto_wireCs@				



cCs
t|j�S(s@The length of the name (in labels).
        @rtype: int
        (RERF(R((s,/usr/lib/python2.7/site-packages/dns/name.pyt__len__{scCs|j|S(N(RF(Rtindex((s,/usr/lib/python2.7/site-packages/dns/name.pyt__getitem__�scCs
|j|�S(N(tconcatenate(RRj((s,/usr/lib/python2.7/site-packages/dns/name.pyt__add__�scCs
|j|�S(N(t
relativize(RRj((s,/usr/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 at depth.

        @param depth: the number of labels in the suffix
        @type depth: int
        @raises ValueError: the depth was not >= 0 and <= the length of the
        name.
        @returns: the tuple (prefix, suffix)
        @rtype: tuple
        is0depth must be >= 0 and <= the length of the name(RERFtdnsRTtemptyRMRO(RtdepthRG((s,/usr/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.
        @rtype: dns.name.Name object
        @raises AbsoluteConcatenation: self is absolute and other is
        not the empty name
        i(R^RERR�RFR�RO(RRjRF((s,/usr/lib/python2.7/site-packages/dns/name.pyR��s
	cCs8|dk	r0|j|�r0t|t|� �S|SdS(s�If self is a subdomain of origin, return a new name which is self
        relative to origin.  Otherwise return self.
        @rtype: dns.name.Name object
        N(R�RyRORE(RR�((s,/usr/lib/python2.7/site-packages/dns/name.pyR��scCs!|j�s|j|�S|SdS(s�If self is a relative name, return a new name which is the
        concatenation of self and origin.  Otherwise return self.
        @rtype: dns.name.Name object
        N(R^R�(RR�((s,/usr/lib/python2.7/site-packages/dns/name.pytderelativize�s
cCs1|r)|r|j|�S|j|�Sn|SdS(sReturn a name with the relativity desired by the caller.  If
        origin is None, then self is returned.  Otherwise, if
        relativize is true the name is relativized, and if relativize is
        false the name is derelativized.
        @rtype: dns.name.Name object
        N(R�R�(RR�R�((s,/usr/lib/python2.7/site-packages/dns/name.pytchoose_relativity�s

cCs2|tks|tkr!t�nt|jd�S(s�Return the parent of the name.
        @rtype: dns.name.Name object
        @raises NoParent: the name is either the root name or the empty name,
        and thus has no parent.
        i(trootR�RRORF(R((s,/usr/lib/python2.7/site-packages/dns/name.pytparent�s	N(*RR	R
t	__slots__RRPRVRZR[R]R^R`RdRuRyRzR{R|R}RR�R�R�R�R�R1R�R�R�R�R�R�R�R�R�R�R�R�R�R%R�R�(((s,/usr/lib/python2.7/site-packages/dns/name.pyRO6sJ												=											8						
		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.

    @param text: The text to convert into a name.
    @type text: Unicode string
    @param origin: The origin to append to non-absolute names.
    @type origin: dns.name.Name
    @param idna_codec: IDNA encoder/decoder.  If None, the default IDNA 2003
    encoder/decoder is used.
    @type idna_codec: dns.name.IDNA
    @rtype: dns.name.Name object
    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?RRMR�ROR1t	IDNA_2003tisdigitRaRRRERtappendRR%R�R�RF(	RDR�R�RFRtescapingtedigitsRHR7((s,/usr/lib/python2.7/site-packages/dns/name.pytfrom_unicode�sd		



		

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

    @param text: The text to convert into a name.
    @type text: string
    @param origin: The origin to append to non-absolute names.
    @type origin: dns.name.Name
    @param idna_codec: IDNA encoder/decoder.  If None, the default IDNA 2003
    encoder/decoder is used.
    @type idna_codec: dns.name.IDNA
    @rtype: dns.name.Name object
    s%input to from_text() must be a stringsorigin must be a Name or NoneR+iR�R�s!Bii
is\i����N(R?RR�RRMR�ROR1R@R�R�R�RaRRERR�R%R�R�RF(
RDR�R�RFRR�R�RHR7tbyte_((s,/usr/lib/python2.7/site-packages/dns/name.pyt	from_text)sf
	


		

	
			.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.
    @param message: the entire DNS message
    @type message: string
    @param current: the offset of the beginning of the name from the start
    of the message
    @type current: int
    @raises dns.name.BadPointer: a compression pointer did not point backwards
    in the message
    @raises dns.name.BadLabelType: an invalid label type was encountered.
    @returns: a tuple consisting of the name that was read and the number
    of bytes of the wire format message which were consumed reading it
    @rtype: (dns.name.Name object, int) tuple
    s*input to from_wire() must be a byte stringiii@i�i?iR+(R?RRMR�twiredatat
maybe_wrapR�tunwrapRR
RO(tmessagetcurrentRFtbiggest_pointerthopstcounttcused((s,/usr/lib/python2.7/site-packages/dns/name.pyt	from_wireos<



	



(ER
tioRR�tsysRWtencodings.idnaR,R-R%R:tImportErrorR1t
dns.exceptionR�tdns.wiredatat_compatRRRRRRbtAttributeErrortcalcsizeReRgRhRiRft	exceptiontSyntaxErrorRRt	FormErrorRR
tDNSExceptionRRRRRRRtobjectRR(R2R@RAR�tIDNA_2003_StrictR�tIDNA_2008_PracticaltIDNA_2008_UTS_46tIDNA_2008_StricttIDNA_2008_Transitionalt	IDNA_2008R$RLRNROR�R�R�R�R�R�(((s,/usr/lib/python2.7/site-packages/dns/name.pyt<module>sn


(

# D 		��HF