AlkantarClanX12

Your IP : 18.219.25.226


Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/uu.cpython-37.opt-2.pyc

B

YI~d��@sfddlZddlZddlZdddgZGdd�de�Zd
dd�dd�Zdd	d�Zd
d�Ze	dkrbe�dS)�N�Error�encode�decodec@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�'/opt/alt/python37/lib64/python3.7/uu.pyr'sF)�backtickc	Csrg}�zL|dkrtjj}n`t|t�rz|dkr8tj�|�}|dkrfyt�|�j	}Wnt
k
rdYnXt|d�}|�|�|dkr�tj
j}nt|t�r�t|d�}|�|�|dkr�d}|dkr�d}|�dd�}|�dd�}|�d	|d
@|f�d��|�d�}x2t|�d
k�r2|�tj||d��|�d�}�qW|�rF|�d�n
|�d�Wdx|D]}|���qZWXdS)N�-�rb�wbi��
z\n�
z\rzbegin %o %s
i��ascii�-r)r
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*sF









c

Cszg}|dkrtjj}nt|t�r4t|d�}|�|��z$xr|��}|sNtd��|�	d�sZq:|�
dd�}t|�dkr:|ddkr:yt|d	d
�PWq:t
k
r�Yq:Xq:W|dk�r<|d�d��d�}tj�|�r�td
|����|�	tj��s,dtj��|k�s,tj�r<|�	tj��s,dtj��|k�r<td|�d���|dk�rTt|d	d
�}|dk�rhtjj}n0t|t��r�t|d�}t�||�|}|�|�|��}x�|�rH|�d�dk�rHyt�|�}	Wnjtjk
�r0}
zH|ddd@ddd}t�|d|��}	|�s tj�d|
�Wdd}
~
XYnX|�|	�|��}�q�W|�sXtd��Wdx|D]}|���qbWXdS)Nrrz'No valid begin line found in input filesbegin� ��r��s 	
rz Cannot overwrite existing file: z..zRefusing to write to z due to directory traversalr
send� �?��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	rdsl











"

cCs4ddl}|jdd�}|jdddddd	d
�|jddd
ddd	d
�|��\}}t|�dkrl|�d�t�d�tjj	}tj
j	}t|�dkr�|d}t|�dkr�|d}|jr�|jr�t
|t�r�t|d�}nttjdd�t�d�t||�nD|j�r&t
|t��rt|d�}nttjdd�t�d�t||�dS)Nrz'usage: %prog [-d] [-t] [input [output]])�usagez-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 argumentsr0r
z: cannot do -t to stdoutrz: cannot do -t from stdin)�optparseZOptionParserZ
add_option�
parse_argsr#�errorr�exitrrrrrMrrr�print�argvr)rN�parser�options�args�input�outputrrr	�test�s6




rY�__main__)NN)NNF)
r$rr�__all__�	ExceptionrrrrYrrrrr	�<module>!s
:
J&