CasperSecurity

Current Path : /usr/lib/python3.10/__pycache__/
Upload File :
Current File : //usr/lib/python3.10/__pycache__/uu.cpython-310.pyc

o

`�wi��@sldZddlZddlZddlZgd�ZGdd�de�Zddd�dd	�Zdd
d�Zdd
�Z	e
dkr4e	�dSdS)z�Implementation of the UUencode and UUdecode functions.

encode(in_file, out_file [,name, mode], *, backtick=False)
decode(in_file [, out_file, mode, quiet])
�N)�Error�encode�decodec@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�/usr/lib/python3.10/uu.pyr'srF��backtickc	Csxg}z�|dkrtjj}n/t|t�r;|durtj�|�}|dur1zt�|�j	}Wn	t
y0Ynwt|d�}|�|�|dkrDtj
j}nt|t�rSt|d�}|�|�|durYd}|dur_d}|�dd�}|�dd	�}|�d
|d@|f�d��|�d
�}t|�dkr�|�tj||d��|�d
�}t|�dks�|r�|�d�n|�d�W|D]}|��q�dS|D]}|��q�w)z
Uuencode file�-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�binascii�b2a_uu�close)�in_file�out_file�name�moder�opened_files�data�frrr	r*sR

�







�
�
�
�rc

Cs~g}|dkrtjj}nt|t�rt|d�}|�|��z	|��}|s'td��|�	d�s-q|�
dd�}t|�dkrR|d	dkrRz	t|d
d�Wn
t
yQYnwq|dur�|d�d
��d�}tj�|�rntd|����|�	tj�s�dtj��|vs�tjr�|�	tj�s�dtj��|vr�td|�d���|dur�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*dS|D]}|���q6w)zDecode uuencoded filerr
Tz'No valid begin line found in input filesbegin� ��r��Ns 	
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%�a2b_uu�stderrr"r')
r(r)r+�quietr,�hdr�	hdrfields�fp�sr-�v�nbytesr.rrr	rds�




��
�
�



��
����rcCs2ddl}|jdd�}|jddddd	d
d�|jdd
ddd	d
d�|��\}}t|�dkr6|�d�t�d�tjj	}tj
j	}t|�dkrH|d}t|�dkrR|d}|jrw|jrpt
|t�rct|d�}n
ttjdd�t�d�t||�dS|jr�t
|t�r�t|d�}n
ttjdd�t�d�t||�dS)zuuencode/uudecode main programrNz'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?r0zincorrect number of argumentsr2rz: cannot do -t to stdoutr
z: cannot do -t from stdin)�optparse�OptionParser�
add_option�
parse_argsr$�errorr�exitrrr rrRrrr�print�argvr)rS�parser�options�args�input�outputrrr	�test�s6





r`�__main__)NN)NNF)�__doc__r%rr�__all__�	Exceptionrrrr`rrrrr	�<module>s
:J&
�
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY