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: //usr/local/ssl/local/ssl/lib/python2.4/site-packages/dns/ipv6.pyc
mņ
zkzQc@ssdZdkZdkZdkZeidƒZd„ZeidƒZeidƒZ	eidƒZ
d„ZdS(sIPv6 helper functions.Ns
0+([0-9a-f]+)cCsJt|ƒdjotdƒ‚n|idƒ}g}d}t|ƒ}
xi||
jo[|||d!}t	i
|ƒ}|dj	o|i
dƒ}n|i|ƒ|d7}qMWd}d}d}	t}x~tdƒD]p}||d	joB|o7|}||	}
|
|jo|	}|
}nt}qKqŪ|p|}	t}qŪqŪW|o1d}||	}
|
|jo|	}|
}q‡n|djo£|djof|d
jp|djoL|ddjo;|d
jo
d
}nd}|tii|dƒ}qFdi|| ƒd
di|||ƒ}ndi|ƒ}|S(sĀConvert a network format IPv6 address into text.

    @param address: the binary address
    @type address: string
    @rtype: string
    @raises ValueError: the address isn't 16 bytes long
    is IPv6 addresses are 16 bytes longt	hex_codeciiii’’’’it0iitffffs::s::ffff:it:N(tlentaddresst
ValueErrortencodethextchunkstitltchunkt
_leading_zerotmatchtmtNonetgrouptappendt
best_starttbest_lentstarttFalset
last_was_zerotxrangetendtcurrent_lentTruetprefixtdnstipv4t	inet_ntoatjoin(RRRRR	RRRRRRR
RR((t,/usr/lib/python2.4/site-packages/dns/ipv6.pyRs^









8

0s(.*):(\d+\.\d+\.\d+\.\d+)$s::.*s.*::$c
Csf|djo
d}nti|ƒ}|dj	oitii|idƒƒ}d|idƒt
|dƒt
|dƒt
|dƒt
|dƒf}nti|ƒ}|dj	o|d}n+ti|ƒ}|dj	o|d }n|i
d	ƒ}t|ƒ}|d
jotii‚nt}g}	xÄ|D]¼}|djoP|otii‚nt}x‰tdd
|dƒD]}|	idƒqƒWq;t|ƒ}|d
jotii‚n|d
jodd
||}n|	i|ƒq;W|d
jo|otii‚ndi|	ƒ}y|idƒSWntj
otii‚nXdS(s×Convert a text format IPv6 address into network format.

    @param text: the textual address
    @type text: string
    @rtype: string
    @raises dns.exception.SyntaxError: the text was not properly formatted
    s::s0::is%s:%02x%02x:%02x%02xiiii’’’’Ritt0000iRRN(ttextt
_v4_endingRRRRRt	inet_atonRtbtordt_colon_colon_startt_colon_colon_endtsplitR	RRt	exceptiontSyntaxErrorRt
seen_emptyt	canonicaltcRRR
RtlcR tdecodet	TypeError(
R$R1R
R0RRR'R	R.R/((R!R&`sR


N





(t__doc__tret
dns.exceptionRtdns.ipv4tcompileR
RR%R)R*R&(R%R*R)R5R
RRR&((R!t?s				C