AlkantarClanX12

Your IP : 18.223.209.129


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/uu.cpython-310.opt-2.pyc

o

`�fm�@sj	ddlZddlZddlZgd�ZGdd�de�Zddd�dd�Zdd	d
�Zdd�Ze	d
kr3e�dSdS)�N)�Error�encode�decodec@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�)/opt/alt/python310/lib64/python3.10/uu.pyr&srF��backtickc	Csz	g}z�|dkr
tjj}n/t|t�r<|durtj�|�}|dur2zt�|�j	}Wn	t
y1Ynwt|d�}|�|�|dkrEtj
j}nt|t�rTt|d�}|�|�|durZd}|dur`d}|�dd�}|�dd�}|�d	|d
@|f�d��|�d�}t|�d
kr�|�tj||d��|�d�}t|�d
ks�|r�|�d�n|�d�W|D]}|��q�dS|D]}|��q�w)N�-�rb�wbi��
z\n�
z\rzbegin %o %s
i��ascii�-rr
s`
end
s 
end
)�sys�stdin�buffer�
isinstance�str�os�path�basename�stat�st_mode�AttributeError�open�append�stdout�replace�writer�read�len�binasciiZb2a_uu�close)�in_file�out_file�name�moder�opened_files�data�frrr	r)sT

�







�
�
�
�rc

Cs�	g}|dkrtjj}nt|t�rt|d�}|�|��z	|��}|s(td��|�	d�s.q|�
dd�}t|�dkrS|d	dkrSz	t|d
d�Wn
t
yRYnwq|dur�|d�d��d
�}tj�|�rotd|����|�	tj�s�dtj��|vs�tjr�|�	tj�s�dtj��|vr�td|�d���|dur�t|d
d�}|dkr�tjj}nt|t�r�t|d�}t�||�|}|�|�|��}|�r!|�d�dk�r!zt�|�}	Wn6tj�y
}
z(|d	dd@ddd}t�|d|��}	|�stj�d|
�WYd}
~
nd}
~
ww|�|	�|��}|�r!|�d�dks�|�s(td��W|D]}|���q+dS|D]}|���q7w)Nrr
Tz'No valid begin line found in input filesbegin� ��r��s 	
rz Cannot overwrite existing file: z..zRefusing to write to z due to directory traversalrsend� �?��zWarning: %s
zTruncated input file)rrrrrrr�readliner�
startswith�splitr$�int�
ValueError�rstriprrr�exists�sep�altsepr �chmod�stripr%Za2b_uu�stderrr"r&)
r'r(r*�quietr+ZhdrZ	hdrfields�fp�sr,�v�nbytesr-rrr	rcs�




��
�
�



��
����rcCs4	ddl}|jdd�}|jdddddd	d
�|jddd
ddd	d
�|��\}}t|�dkr7|�d�t�d�tjj	}tj
j	}t|�dkrI|d}t|�dkrS|d}|jrx|jrqt
|t�rdt|d�}n
ttjdd�t�d�t||�dS|jr�t
|t�r�t|d�}n
ttjdd�t�d�t||�dS)Nrz'usage: %prog [-d] [-t] [input [output]])Zusagez-dz--decoderzDecode (instead of encode)?F�
store_true)�dest�help�default�actionz-tz--text�textz2data is text, encoded format unix-compatible text?r/zincorrect number of argumentsr1rz: cannot do -t to stdoutr
z: cannot do -t from stdin)�optparseZOptionParserZ
add_option�
parse_argsr$�errorr�exitrrr rrMrrr�print�argvr)rN�parserZoptions�args�input�outputrrr	�test�s8





rX�__main__)NN)NNF)
r%rr�__all__�	ExceptionrrrrXrrrrr	�<module>s
:J&
�