AlkantarClanX12

Your IP : 18.191.237.228


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

B

YI~dt:�@shddlZddlZddlZyddlZdZWnek
r@dZYnXddgZGdd�de�ZdZ	dZ
d	Zd
ZeeZ
dZGdd�d�Zer�Gd
d�de�Ze�d�edk�rdddlZeejd�Zee���e�ejd�e�ejd�e��e��\ZZxXeded�D]FZe� e�\Z!Z"Z#ede�xe"D]Z$ede$��q8Wed��qWe�%�dS)�NTF�POP3�error_protoc@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�+/opt/alt/python37/lib64/python3.7/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-8cCs@||_||_d|_|�|�|_|j�d�|_d|_|��|_	dS)NF�rbr)
�host�port�_tls_established�_create_socket�sock�makefile�file�
_debugging�_getresp�welcome)�selfr
r�timeoutrrr�__init__asz
POP3.__init__cCst�|j|jf|�S)N)�socketZcreate_connectionr
r)rrrrrrkszPOP3._create_socketcCs,|jdkrtdt|��|j�|t�dS)N�z*put*)r�print�reprrZsendall�CRLF)r�linerrr�_putlinens
z
POP3._putlinecCs.|jrtdt|��t||j�}|�|�dS)Nz*cmd*)rrr�bytes�encodingr )rrrrr�_putcmdus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�lenrrrrr�CR)rr�octetsrrr�_getlines
z
POP3._getlinecCs:|��\}}|jdkr$tdt|��|�d�s6t|��|S)Nrz*resp*�+)r+rrr�
startswithr)r�resp�orrrr�s

z
POP3._getrespcCsp|��}g}d}|��\}}xH|dkrd|�d�rD|d}|dd�}||}|�|�|��\}}qW|||fS)Nr�.s..r)rr+r-�append)rr.�listr*rr/rrr�_getlongresp�s


zPOP3._getlongrespcCs|�|�|��S)N)r#r)rrrrr�	_shortcmd�s
zPOP3._shortcmdcCs|�|�|��S)N)r#r3)rrrrr�_longcmd�s
z
POP3._longcmdcCs|jS)N)r)rrrr�
getwelcome�szPOP3.getwelcomecCs
||_dS)N)r)r�levelrrr�set_debuglevel�szPOP3.set_debuglevelcCs|�d|�S)NzUSER %s)r4)r�userrrrr9�sz	POP3.usercCs|�d|�S)NzPASS %s)r4)rZpswdrrr�pass_�sz
POP3.pass_cCsF|�d�}|��}|jr&tdt|��t|d�}t|d�}||fS)NZSTATz*stat*r�)r4�splitrrr�int)rZretvalZretsZnumMessagesZsizeMessagesrrr�stat�s
z	POP3.statNcCs |dk	r|�d|�S|�d�S)NzLIST %sZLIST)r4r5)r�whichrrrr2�s	z	POP3.listcCs|�d|�S)NzRETR %s)r5)rr?rrr�retr�sz	POP3.retrcCs|�d|�S)NzDELE %s)r4)rr?rrr�dele�sz	POP3.delecCs
|�d�S)NZNOOP)r4)rrrr�noopsz	POP3.noopcCs
|�d�S)NZRSET)r4)rrrr�rsetsz	POP3.rsetcCs|�d�}|��|S)NZQUIT)r4�close)rr.rrr�quits
z	POP3.quitcCs�z |j}d|_|dk	r|��Wd|j}d|_|dk	r�zVy|�tj�Wn@tk
r�}z"|jtjkrxt	|dd�dkrx�Wdd}~XYnXWd|��XXdS)NZwinerrorri&')
rrDrZshutdownrZ	SHUT_RDWR�OSError�errnoZENOTCONN�getattr)rrr�excrrrrDsz
POP3.closecCs|�d|�S)NzRPOP %s)r4)rr9rrr�rpop2sz	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	hexdigestr4)rr9ZpasswordZsecret�mrMZdigestrrr�apop9sz	POP3.apopcCs|�d||f�S)Nz	TOP %s %s)r5)rr?Zhowmuchrrr�topNszPOP3.topcCs |dk	r|�d|�S|�d�S)NzUIDL %sZUIDL)r4r5)rr?rrr�uidlWsz	POP3.uidlcCs
|�d�S)NZUTF8)r4)rrrr�utf8csz	POP3.utf8c	
Cstdd�}i}y8|�d�}|d}x |D]}||�\}}|||<q&WWn*tk
rn}ztd��Wdd}~XYnX|S)NcSs"|�d���}|d|dd�fS)N�asciirr)�decoder<)rZlstrrr�	_parsecapvszPOP3.capa.<locals>._parsecapZCAPArz!-ERR CAPA not supported by server)r5r)	rrV�capsr.ZrawcapsZcaplineZcapnmZcapargsZ_errrrr�capais


z	POP3.capacCsxtstd��|jrtd��|��}d|kr2td��|dkrBt��}|�d�}|j|j|j	d�|_|j�
d�|_d|_|S)Nz-ERR TLS support missingz$-ERR TLS session already establishedZSTLSz!-ERR STLS not supported by server)�server_hostnamerT)�HAVE_SSLrrrX�ssl�_create_stdlib_contextr4�wrap_socketrr
rr)r�contextrWr.rrr�stls�s
z	POP3.stls)N)N)N)&rrrr"�	POP3_PORTr�_GLOBAL_DEFAULT_TIMEOUTrrr r#r+rr3r4r5r6r8r9r:r>r2r@rArBrCrErDrJ�re�compilerKrPrQrRrSrXr_rrrrr2s>-	




	
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 insteadr;)�certfile�keyfile)�
ValueError�warnings�warn�DeprecationWarningrfrer[r\r^rr)rr
rrfrerr^rhrrrr�szPOP3_SSL.__init__cCs"t�||�}|jj||jd�}|S)N)rY)rrr^r]r
)rrrrrrr�s
zPOP3_SSL._create_socketcCstd��dS)Nz$-ERR TLS session already established)r)rrfrer^rrrr_�sz
POP3_SSL.stls)NNN)	rrr�
POP3_SSL_PORTrrarrr_rrrrrd�srd�__main__rr;�zMessage %d:z   z-----------------------)&rGrbrr[rZ�ImportError�__all__�	Exceptionrr`rkr)ZLFrr'rrdr1r�sys�argv�arr6r9r:r2r>ZnumMsgsZ	totalSize�range�ir@�header�msgr*rrErrrr�<module>sH
l0