ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python38/lib64/python3.8/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python38/lib64/python3.8/__pycache__/poplib.cpython-38.opt-2.pyc

U

.��c�:�@shddlZddlZddlZddlZzddlZdZWnek
rHdZYnXddgZGdd�de�Z	dZ
dZd	Zd
Z
ee
ZdZGdd�d�Zer�Gd
d�de�Ze�d�edk�rdddlZeejd�Zee���e�ejd�e�ejd�e��e��\ZZeded�D]BZe� e�\Z!Z"Z#ede�e"D]Z$ede$��q<ed��qe�%�dS)�NTF�POP3�error_protoc@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�+/opt/alt/python38/lib64/python3.8/poplib.pyrs�ni��
�
ic@seZdZdZeejfdd�Zdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd<dd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Ze�d/�Zd0d1�Z d2d3�Z!d=d4d5�Z"d6d7�Z#d8d9�Z$d>d:d;�Z%dS)?rzUTF-8cCsP||_||_d|_t�d|||�|�|�|_|j�d�|_d|_	|�
�|_dS)NFzpoplib.connect�rbr)�host�port�_tls_established�sys�audit�_create_socket�sock�makefile�file�
_debugging�_getresp�welcome)�selfr
r�timeoutrrr�__init__bsz
POP3.__init__cCst�|j|jf|�S�N)�socketZcreate_connectionr
r)rrrrrrmszPOP3._create_socketcCs:|jdkrtdt|��t�d||�|j�|t�dS)N�z*put*zpoplib.putline)r�print�reprrrrZsendall�CRLF�r�linerrr�_putlineps
z
POP3._putlinecCs.|jrtdt|��t||j�}|�|�dS)Nz*cmd*)rrr �bytes�encodingr$r"rrr�_putcmdxszPOP3._putcmdcCs�|j�td�}t|�tkr$td��|jdkr<tdt|��|sHtd��t|�}|dd�tkrp|dd�|fS|dd�t	kr�|dd�|fS|dd�|fS)Nrz
line too longz*get*z-ERR EOF������)
r�readline�_MAXLINE�lenrrrr r!�CR)rr#�octetsrrr�_getline�s
z
POP3._getlinecCs:|��\}}|jdkr$tdt|��|�d�s6t|��|S)Nrz*resp*�+)r/rrr �
startswithr)r�resp�orrrr�s

z
POP3._getrespcCsl|��}g}d}|��\}}|dkrb|�d�rB|d}|dd�}||}|�|�|��\}}q|||fS)Nr�.s..r)rr/r1�append)rr2�listr.r#r3rrr�_getlongresp�s

zPOP3._getlongrespcCs|�|�|��Sr)r'rr"rrr�	_shortcmd�s
zPOP3._shortcmdcCs|�|�|��Sr)r'r7r"rrr�_longcmd�s
z
POP3._longcmdcCs|jSr)r�rrrr�
getwelcome�szPOP3.getwelcomecCs
||_dSr)r)r�levelrrr�set_debuglevel�szPOP3.set_debuglevelcCs|�d|�S)NzUSER %s�r8�r�userrrrr@�sz	POP3.usercCs|�d|�S)NzPASS %sr>)rZpswdrrr�pass_�sz
POP3.pass_cCsF|�d�}|��}|jr&tdt|��t|d�}t|d�}||fS)NZSTATz*stat*r�)r8�splitrrr �int)rZretvalZretsZnumMessagesZsizeMessagesrrr�stat�s
z	POP3.statNcCs |dk	r|�d|�S|�d�S)NzLIST %sZLIST�r8r9�r�whichrrrr6�s	z	POP3.listcCs|�d|�S)NzRETR %s�r9rGrrr�retr�sz	POP3.retrcCs|�d|�S)NzDELE %sr>rGrrr�dele�sz	POP3.delecCs
|�d�S)NZNOOPr>r:rrr�noopsz	POP3.noopcCs
|�d�S)NZRSETr>r:rrr�rsetsz	POP3.rsetcCs|�d�}|��|S)NZQUIT)r8�close)rr2rrr�quits
z	POP3.quitcCs�z |j	}d|_	|dk	r|��W5|j}d|_|dk	r�zVz|�tj�Wn@tk
r�}z"|jtjkrxt|dd�dkrx�W5d}~XYnXW5|��XXdS)NZwinerrorri&')
rrNZshutdownrZ	SHUT_RDWR�OSError�errnoZENOTCONN�getattrr)rr�excrrrrrNs �z
POP3.closecCs|�d|�S)NzRPOP %sr>r?rrr�rpop5sz	POP3.rpops\+OK.[^<]*(<.*>)cCs\t||j�}|j�|j�}|s&td��ddl}|�d�|}|�|��	�}|�
d||f�S)Nz!-ERR APOP not supported by serverrrz
APOP %s %s)r%r&�	timestamp�matchrr�hashlib�groupZmd5Z	hexdigestr8)rr@ZpasswordZsecret�mrWZdigestrrr�apop<sz	POP3.apopcCs|�d||f�S)Nz	TOP %s %srI)rrHZhowmuchrrr�topQszPOP3.topcCs |dk	r|�d|�S|�d�S)NzUIDL %sZUIDLrFrGrrr�uidlZsz	POP3.uidlcCs
|�d�S)NZUTF8r>r:rrr�utf8fsz	POP3.utf8c	
Cspdd�}i}z4|�d�}|d}|D]}||�\}}|||<q$Wn*tk
rj}ztd��W5d}~XYnX|S)NcSs"|�d���}|d|dd�fS)N�asciirr)�decoderC)r#Zlstrrr�	_parsecapyszPOP3.capa.<locals>._parsecapZCAPArz!-ERR CAPA not supported by server)r9r)	rr`�capsr2ZrawcapsZcaplineZcapnmZcapargsZ_errrrr�capals

z	POP3.capacCsxtstd��|jrtd��|��}d|kr2td��|dkrBt��}|�d�}|j|j|j	d�|_|j�
d�|_d|_|S)Nz-ERR TLS support missing�$-ERR TLS session already establishedZSTLSz!-ERR STLS not supported by server�Zserver_hostnamerT)�HAVE_SSLrrrb�ssl�_create_stdlib_contextr8�wrap_socketrr
rr)r�contextrar2rrr�stls�s 
�z	POP3.stls)N)N)N)&rrrr&�	POP3_PORTr�_GLOBAL_DEFAULT_TIMEOUTrrr$r'r/rr7r8r9r;r=r@rArEr6rJrKrLrMrOrNrT�re�compilerUrZr[r\r]rbrjrrrrr3s@-�





	
c@s4eZdZeddejdfdd�Zdd�Zddd�ZdS)	�POP3_SSLNcCs�|dk	r|dk	rtd��|dk	r0|dk	r0td��|dk	s@|dk	rVddl}|�dtd�||_||_|dkrxtj||d�}||_t	�
||||�dS)Nz4context and keyfile arguments are mutually exclusivez5context and certfile arguments are mutually exclusiverzAkeyfile and certfile are deprecated, use a custom context insteadrB)�certfile�keyfile)�
ValueError�warnings�warn�DeprecationWarningrqrprfrgrirr)rr
rrqrprrirsrrrr�s$��zPOP3_SSL.__init__cCs"t�||�}|jj||jd�}|S)Nrd)rrrirhr
)rrrrrrr�s
�zPOP3_SSL._create_socketcCstd��dS)Nrc)r)rrqrprirrrrj�sz
POP3_SSL.stls)NNN)	rrr�
POP3_SSL_PORTrrlrrrjrrrrro�s�
ro�__main__rrB�zMessage %d:z   z-----------------------)&rQrmrrrfre�ImportError�__all__�	Exceptionrrkrvr-ZLFr!r+rror5r�argv�arr;r@rAr6rEZnumMsgsZ	totalSize�range�irJ�header�msgr.r#rOrrrr�<module>sJ
n0



Zerion Mini Shell 1.0