ROOTPLOIT
Server: LiteSpeed
System: Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: niphet (1079)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //lib64/python3.8/encodings/__pycache__/punycode.cpython-38.pyc
U

e5d@sdZddlZddZddZddZd	d
ZddZd
ZddZddZ	ddZ
ddZddZddZ
ddZGdddejZGdddejZGd d!d!ejZGd"d#d#eejZGd$d%d%eejZd&d'ZdS)(uY Codec for the Punicode encoding, as specified in RFC 3492

Written by Martin v. Löwis.
NcCsPt}t}|D]*}t|dkr0|t|q||qt|}t||fS)z 3.1 Basic code point segregation)	bytearraysetordappendaddsortedbytes)strbaseextendedcr*/usr/lib64/python3.8/encodings/punycode.py	segregate
srcCs&d}|D]}t||kr|d7}q|S)z@Return the length of str, considering only characters below max.r)r)r
maxresr
rrr
selective_lens

rcCsNt|}|d7}||krdS||}||kr8|d|fS||kr|d7}qdS)aReturn a pair (index, pos), indicating the next occurrence of
    char in str. index is the position of the character considering
    only ordinals up to and including char, and pos is the position in
    the full string. index/pos is the starting position in the full
    string.r)rN)len)r
charindexposlr
rrrselective_findsrcCsd}g}d}|D]r}d}}t|}t||}	|	d||}
t||||\}}|dkrZq~|
||7}
||
d|}d}
q>|}q|S)3.2 Insertion unsort codingrrrr)rrrr)r
rZoldcharresultZoldindexr
rrrZcurlendeltarrrinsertion_unsort0s"
rcCs,d|d|}|dkrdS|dkr(dS|S)N$rr)jbiasrrrrTFsr$s$abcdefghijklmnopqrstuvwxyz0123456789cCsnt}d}t||}||kr2|t|t|S|t|||d|||d|}|d7}q
dS)(3.3 Generalized variable-length integersrr rN)rr$rdigitsr	)Nr#rr"trrrgenerate_generalized_integerNs
r)cCsX|r|d}n|d}|||7}d}|dkr@|d}|d7}q&|d||d}|S)Niri#r &r)rfirstnumcharsZ	divisionsr#rrradapt[s

r/cCsPt}d}t|D]4\}}t||}||t||dk||d}qt|S)z3.4 Bias adaptationHrr)r	enumerater)extendr/r	)Zbaselendeltasrr#Zpointsrsrrrgenerate_integersjs

r5cCs8t|\}}t||}tt||}|r4|d|S|S)N-)rrr5r)textrrr3rrrpunycode_encodeus
r8c
Csd}d}d}zt||}Wn0tk
rL|dkr<td|ddfYSX|d7}d|krjdkrxnn
|d}nHd|krd	krnn
|d
}n&|dkrtd||dn|dfSt||}	|||7}||	kr||fS|d|	}|d7}qdS)
r%rrstrictzincomplete punicode stringNAZ09z Invalid extended code point '%s'r )r
IndexErrorUnicodeErrorr$)
rextposr#errorsrwr"rdigitr(rrrdecode_generalized_numbers2



rEc	Csd}d}d}d}|t|krt||||\}}|dkr:|S||d7}||t|d7}|dkr~|dkrvtd	|td
}|t|d}|d|t|||d}t||dkt|}|}q|S)rrrr0rNrir9zInvalid character U+%x?)rrEr@rchrr/)	rrrBrrr#rAZnewposrrrrinsertion_sorts, rHcCst|tr|d}t|tr&t|}|d}|dkrLd}t|d}n.t|d|d|}t||ddd}t|||S)Nasciir6rr)
isinstancer
encode
memoryviewr	rfindupperrH)r7rBrrrrrrpunycode_decodes



rPc@s eZdZdddZdddZdS)	Codecr9cCst|}|t|fSN)r8rselfinputrBrrrrrLszCodec.encodecCs*|dkrtd|t||}|t|fSN)r9replaceignorezUnsupported error handling )r@rPrrSrrrdecodes
zCodec.decodeN)r9)r9)__name__
__module____qualname__rLrYrrrrrQs
rQc@seZdZdddZdS)IncrementalEncoderFcCst|SrR)r8rTrUfinalrrrrLszIncrementalEncoder.encodeN)F)rZr[r\rLrrrrr]sr]c@seZdZdddZdS)IncrementalDecoderFcCs$|jdkrtd|jt||jSrV)rBr@rPr^rrrrYs
zIncrementalDecoder.decodeN)F)rZr[r\rYrrrrr`sr`c@seZdZdS)StreamWriterNrZr[r\rrrrrasrac@seZdZdS)StreamReaderNrbrrrrrcsrcc	Cs tjdtjtjttttdS)NZpunycode)namerLrYincrementalencoderincrementaldecoderstreamwriterstreamreader)	codecs	CodecInforQrLrYr]r`rarcrrrrgetregentrysrk)__doc__rirrrrr$r&r)r/r5r8rErHrPrQr]r`rarcrkrrrr<module>s(