MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/2/cwd/usr/lib/python2.4/site-packages/dns/name.pyc
mò

Û|Qc@s dZdkZdkZdkZeidjo
dkZndkZdk	ZdZ
dZdZdZ
dZdeiifd	„ƒYZd
eiifd„ƒYZdeiifd
„ƒYZdeiifd„ƒYZdeiifd„ƒYZdeiifd„ƒYZdeiifd„ƒYZdeiifd„ƒYZdeiifd„ƒYZhde<de<de<de<de<de<d e<d!e<Zd"„Zd#„Zd$e fd%„ƒYZ!e!d&gƒZ"e!gƒZ#e"d'„Z$e"d(„Z%d)„Z&dS(*sDNS 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
Niiiiiit
EmptyLabelcBstZdZRS(sRaised if a label is empty.(t__name__t
__module__t__doc__(((t,/usr/lib/python2.4/site-packages/dns/name.pyR(st	BadEscapecBstZdZRS(s;Raised if an escaped code in a text format name is invalid.(RRR(((RR,st
BadPointercBstZdZRS(sCRaised if a compression pointer points forward instead of backward.(RRR(((RR0stBadLabelTypecBstZdZRS(s:Raised if the label type of a wire format name is unknown.(RRR(((RR4stNeedAbsoluteNameOrOrigincBstZdZRS(s~Raised if an attempt is made to convert a non-absolute name to
    wire when there is also a non-absolute (or missing) origin.(RRR(((RR8stNameTooLongcBstZdZRS(s&Raised if a name is > 255 octets long.(RRR(((RR	=stLabelTooLongcBstZdZRS(s&Raised if a label is > 63 octets long.(RRR(((RR
AstAbsoluteConcatenationcBstZdZRS(sbRaised if an attempt is made to append anything other than the
    empty name to an absolute name.(RRR(((RREstNoParentcBstZdZRS(sVRaised if an attempt is made to get the parent of the root name
    or the empty name.(RRR(((RRJst"t(t)t.t;s\t@t$cCs‚d}xu|D]m}|tjo|d|7}q
t|ƒdjo!t|ƒdjo||7}q
|dt|ƒ7}q
W|S(saEscape the characters in label which need it.
    @returns: the escaped string
    @rtype: stringts\i is\%03dN(ttexttlabeltct_escapedtord(RRR((Rt	_escapifyZs
&cCsÑt|ƒ}d}d}d}xm|D]e}t|ƒ}||d7}|djo
t‚n|djo|djo
|}n|d7}q%W|djo
t	‚n|djo||djo
t
‚ndS(siCheck 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 LabelTooLong: an individual label 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?RiÿN(tlentlabelstlttotaltitjRtllR
R	R(RR RR!RRR((Rt_validate_labelshs$




tNamecBsOtZdZdgZd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„Zd„Zd„Zd„Zed„Zed„Zed„Zeeed„Zd„Zd„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d„Z#ee$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.RcCs0tt|ƒidt|ƒƒt|iƒdS(s–Initialize a domain name from a list of labels.
        @param labels: the labels
        @type labels: any iterable whose values are strings
        RN(tsuperR#tselft__setattr__ttupleRR"(R%R((Rt__init__ŒscCstdƒ‚dS(Ns+object doesn't support attribute assignment(t	TypeError(R%tnametvalue((RR&•scCs't|iƒdjo|iddjS(sXIs the most significant label of this name the root label?
        @rtype: bool
        iiÿÿÿÿRN(RR%R(R%((Rtis_absolute˜scCs't|iƒdjo|iddjS(s\Is this name wild?  (I.e. Is the least significant label '*'?)
        @rtype: bool
        it*N(RR%R(R%((Rtis_wildŸscCsZd}x@|iD]5}x,|D]$}||d>t|iƒƒ7}qWqWt|ti	ƒS(sHReturn a case-insensitive hash of the name.
        @rtype: int
        liN(
thR%RRRRtlowertinttsystmaxint(R%RR/R((Rt__hash__¦s
&c
CsÅ|iƒ}|iƒ}||jo)|otddfSqNtddfSnt|iƒ}	t|iƒ}|	|}
|
djo
|	}n|}d}d}t}xÖ|djoÈ|d8}|	d8}	|d8}|i|	iƒ}|i|iƒ}||jo.d}|djo
t}n|||fSn<||jo.d}|djo
t}n|||fSn|d7}q¨W|
}|
djo
t}n|
djo
t}nt}|||fS(s±Compare two names, returning a 3-tuple (relation, order, nlabels).

        I{relation} describes the relation ship beween 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ÿÿÿÿN(R%R,tsabstothertoabst
NAMERELN_NONERRtl1tl2tldiffRtordertnlabelstnamerelnR0tlabel1tlabel2tNAMERELN_COMMONANCESTORtNAMERELN_SUPERDOMAINtNAMERELN_SUBDOMAINtNAMERELN_EQUAL(
R%R6R=R7R5R>RR:R?R9R;R<R@((Rtfullcompare±sR

















cCs>|i|ƒ\}}}|tjp
|tjotSnt	S(soIs self a subdomain of other?

        The notion of subdomain includes equality.
        @rtype: bool
        N(
R%RER6tnrtotnlRCRDtTruetFalse(R%R6RHRGRF((Rtis_subdomainîs
cCs>|i|ƒ\}}}|tjp
|tjotSnt	S(sqIs self a superdomain of other?

        The notion of subdomain includes equality.
        @rtype: bool
        N(
R%RER6RFRGRHRBRDRIRJ(R%R6RHRGRF((Rtis_superdomainús
cCs.tg}|iD]}||iƒq~ƒS(sˆReturn a name which is equal to the current name, but is in
        DNSSEC canonical form.
        @rtype: dns.name.Name object
        N(R#t_[1]R%RtxR0(R%RMRN((RtcanonicalizescCs3t|tƒo|i|ƒddjSntSdS(Nii(t
isinstanceR6R#R%RERJ(R%R6((Rt__eq__scCs3t|tƒo|i|ƒddjSntSdS(Nii(RPR6R#R%RERI(R%R6((Rt__ne__scCs3t|tƒo|i|ƒddjSntSdS(Nii(RPR6R#R%REtNotImplemented(R%R6((Rt__lt__scCs3t|tƒo|i|ƒddjSntSdS(Nii(RPR6R#R%RERS(R%R6((Rt__le__ scCs3t|tƒo|i|ƒddjSntSdS(Nii(RPR6R#R%RERS(R%R6((Rt__ge__&scCs3t|tƒo|i|ƒddjSntSdS(Nii(RPR6R#R%RERS(R%R6((Rt__gt__,scCsd|iƒdS(Ns
<DNS name t>(R%t__str__(R%((Rt__repr__2scCs
|itƒS(N(R%tto_textRJ(R%((RRY5scCsšt|iƒdjodSnt|iƒdjo|iddjodSn|o|iƒo|id }n
|i}ditt|ƒƒ}|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
        iRiRRiÿÿÿÿN(
RR%Rtomit_final_dotR,RtjointmapRts(R%R\RR_((RR[8s*	cCs¾t|iƒdjodSnt|iƒdjo|iddjodSn|o|iƒo|id }n
|i}dig}|D]}|t	i
it|ƒƒq~ƒ}|S(sConvert name to Unicode text format.

        IDN ACE lables 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.
        @rtype: string
        iu@iRu.iÿÿÿÿN(RR%RR\R,RR]RMRNt	encodingstidnat	ToUnicodeRR_(R%R\RRMR_RN((Rt
to_unicodeJs*	<cCs®|iƒpN|djp|iƒo
t‚nt|iƒ}|it|iƒƒn
|i}g}|D])}|dt
t|ƒƒ|iƒfqo~}di|ƒ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%s%sRN(R%R,torigintNoneRtlistRtextendRMRNtchrRR0tdlabelsR](R%RdRRiRMRN((Rt
to_digestable_s

	=c
CsÀ|djotiƒ}t}nt}|iƒpN|djp|iƒo
t
‚nt|iƒ}|i
t|iƒƒn
|i}d}x|D]	}t||ƒ}
|d7}|dj	o|i|
ƒ}nd}|dj	o.d|}	tid|	ƒ}|i|ƒPqš|dj	o>t|
ƒdjo+|iƒ}|djo|||
<qfnt|ƒ}|it|ƒƒ|djo|i|ƒqšqšW|o|iƒSndS(sûConvert name to wire format, possibly compressing it.

        @param file: the file where the name is emitted (typically
        a cStringIO 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ÿ?N(tfileRet	cStringIOtStringIORItwant_returnRJR%R,RdRRfRRgRRR#tntcompresstgettposR+tstructtpackR_twriteRttellRRhtgetvalue(
R%RkRpRdRRrRRnRR+RoRR_((Rtto_wirewsD



	




 

cCs
t|iƒS(s@The length of the name (in labels).
        @rtype: int
        N(RR%R(R%((Rt__len__¯scCs|i|S(N(R%Rtindex(R%Rz((Rt__getitem__¶scCs|i||!S(N(R%Rtstarttstop(R%R|R}((Rt__getslice__¹scCs
|i|ƒS(N(R%tconcatenateR6(R%R6((Rt__add__¼scCs
|i|ƒS(N(R%t
relativizeR6(R%R6((Rt__sub__¿scCs›t|iƒ}|djo|tiifSnL||jotii|fSn+|djp
||jotdƒ‚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 nameN(
RR%RRtdepthtdnsR*temptyt
ValueErrorR#(R%RƒR((RtsplitÂs	

cCsY|iƒot|ƒdjo
t‚nt|iƒ}|it|iƒƒ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
        iN(	R%R,RR6RRfRRgR#(R%R6R((RRÖs 
cCs>|dj	o)|i|ƒot|t|ƒ ƒSn|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(RdReR%RKR#R(R%Rd((RRãscCs&|iƒp|i|ƒSn|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,RRd(R%Rd((Rtderelativizeîs
cCs8|o)|o|i|ƒSq4|i|ƒ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(RdRR%Rˆ(R%RdR((Rtchoose_relativityùscCs5|tjp
|tjo
t‚nt|idƒ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.
        iN(R%trootR…RR#R(R%((Rtparent	s
('RRRt	__slots__R(R&R,R.R4RERKRLRORQRRRTRURVRWRZRYRJR[RcReRjRxRyR{R~R€R‚R‡RRRˆRIR‰R‹(((RR#sD								=											8							
		RcCsµt|tƒptdƒ‚n|djp
t|tƒptdƒ‚ng}d}t	}d}d}|djo
d}n|o×|djotdgƒSnxd|D]\}|o®|djo;|iƒot|ƒ}|d7}qe||7}t	}q
|iƒp
t‚n|d	9}|t|ƒ7}|d7}|d
jot	}|t|ƒ7}q
q®|djp'|djp|djp
|d
jo@t|ƒdjo
t‚n|itii|ƒƒd}q®|djot}d}d}q®||7}q®W|o
t‚nt|ƒdjo|itii|ƒƒq`|idƒnt|ƒdjp|ddjo'|dj	o|it|iƒƒnt|ƒS(sxConvert unicode text into a Name object.

    Lables are encoded in IDN ACE form.

    @rtype: dns.name.Name object
    s0input to from_unicode() must be a unicode stringsorigin must be a Name or Noneuiu@u.Rii
iu。u.u。u\iÿÿÿÿN(RPRtunicodeR†RdReR#RRRJtescapingtedigitsRRtisdigitR1RRhRRtappendR`RatToASCIIRIRgRf(RRdRRRRŽRR((Rtfrom_unicodesd











4




1cCs§t|tƒpAt|tƒo!tidjot||ƒSqQtdƒ‚n|d
jp
t|t
ƒptdƒ‚ng}d}t
}d}d}|djo
d}n|o˜|djot
dgƒSnx1|D])}|o®|djo;|iƒot|ƒ}|d7}q–||7}t
}q|iƒp
t‚n|d	9}|t|ƒ7}|d7}|d
jot
}|t|ƒ7}qqß|djo4t|ƒdjo
t‚n|i|ƒd}qß|djot}d}d}qß||7}qßW|o
t‚nt|ƒdjo|i|ƒqR|idƒnt|ƒdjp|ddjo'|d
j	o|it|iƒƒnt
|ƒS(sFConvert text into a Name object.
    @rtype: dns.name.Name object
    is%input to from_text() must be a stringsorigin must be a Name or NoneRiRRii
is\iÿÿÿÿN(RPRtstrRR2t
hexversionR“RdR†ReR#RRRJRŽRRRRR1RRhRRR‘RIRgRf(RRdRRRRŽRR((Rt	from_textTsh 


















1cCs”t|tƒptdƒ‚ntii|ƒ}g}|}d}t||ƒ}|d7}d}x|djo|djoG|i||||!iƒƒ||7}|djo||7}q=nv|djob|d@dt||ƒ}|djo|d7}n||jo
t‚n|}|d7}nt‚t||ƒ}|d7}|djo|d7}qgqgW|idƒ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?iRN(RPtmessageR”R†R„twiredatat
maybe_wrapRtcurrenttbiggest_pointerthopsRtcounttcusedR‘tunwrapRRR#(R—RšRRœRRžR›((Rt	from_wire‘s@












('RRlRsR2R•tencodings.idnaR`t
dns.exceptionR„tdns.wiredataR8RBRCRDRAt	exceptiontSyntaxErrorRRt	FormErrorRRtDNSExceptionRR	R
RRRIRRR"tobjectR#RŠR…R“R–R (RBRlRARR`R
RR#RsR R„R8R–R…RCRRR2RRRRR	RRDR"R“RŠ((Rt?s>			
		N		ÿ“>=