uawdijnntqw1x1x1
IP : 216.73.216.139
Hostname : altar28.supremepanel28.com
Kernel : Linux altar28.supremepanel28.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
home
/
.
/
..
/
..
/
..
/
lib64
/
python3.6
/
venv
/
..
/
http
/
..
/
__pycache__
/
poplib.cpython-36.pyc
/
/
3 ��i�:� @sldZddlZddlZddlZyddlZdZWnek rDdZYnXddgZGdd�de�Z dZ d Zd ZdZ ee ZdZGd d�d�Zer�Gdd�de�Zejd�edk�rhddlZeejd�Zeej��ejejd�ejejd�ej�ej�\ZZxXeded�D]FZ ej!e �\Z"Z#Z$ede �xe#D]Z%ede%��q<Wed��qWej&�dS)z@A POP3 client class. Based on the J. Myers POP3 draft, Jan. 96 �NTF�POP3�error_protoc@seZdZdS)rN)�__name__� __module__�__qualname__�rr�/usr/lib64/python3.6/poplib.pyrs�ni�� � ic@seZdZdZdZeejfdd�Zdd�Z dd�Z d d �Zdd�Zd d�Z dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd=d d!�Zd"d#�Zd$d%�Zd&d'�Zd(d)�Zd*d+�Zd,d-�Zd.d/�Zejd0�Z d1d2�Z!d3d4�Z"d>d5d6�Z#d7d8�Z$d9d:�Z%d?d;d<�Z&dS)@raPThis class supports both the minimal and optional command sets. Arguments can be strings or integers (where appropriate) (e.g.: retr(1) and retr('1') both work equally well. Minimal Command Set: USER name user(name) PASS string pass_(string) STAT stat() LIST [msg] list(msg = None) RETR msg retr(msg) DELE msg dele(msg) NOOP noop() RSET rset() QUIT quit() Optional Commands (some servers support these): RPOP name rpop(name) APOP name digest apop(name, digest) TOP msg n top(msg, n) UIDL [msg] uidl(msg = None) CAPA capa() STLS stls() UTF8 utf8() Raises one exception: 'error_proto'. Instantiate with: POP3(hostname, port=110) NB: the POP protocol locks the mailbox from user authorization until QUIT, so be sure to get in, suck the messages, and quit, each time you access the mailbox. POP is a line-based protocol, which means large mail messages consume lots of python cycles reading them line-by-line. If it's available on your mail server, use IMAP4 instead, it doesn't suffer from the two problems above. zUTF-8cCs@||_||_d|_|j|�|_|jjd�|_d|_|j�|_ dS)NF�rbr) �host�port�_tls_established�_create_socket�sock�makefile�file� _debugging�_getresp�welcome)�selfr r�timeoutrrr�__init__asz POP3.__init__cCstj|j|jf|�S)N)�socketZcreate_connectionr r)rrrrrrkszPOP3._create_socketcCs,|jdkrtdt|��|jj|t�dS)N�z*put*)r�print�reprrZsendall�CRLF)r�linerrr�_putlinens z POP3._putlinecCsB|jrtdt|��t||j�}tjd|�r4td��|j|�dS)Nz*cmd*s[-]z*Control characters not allowed in commands) rrr�bytes�encoding�re�search� ValueErrorr )rrrrr�_putcmduszPOP3._putcmdcCs�|jjtd�}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(���r)) r�readline�_MAXLINE�lenrrrrr�CR)rr�octetsrrr�_getline�s z POP3._getlinecCs:|j�\}}|jdkr$tdt|��|jd�s6t|��|S)Nrz*resp*�+)r/rrr� startswithr)r�resp�orrrr�s z POP3._getrespcCsp|j�}g}d}|j�\}}xH|dkrd|jd�rD|d}|dd�}||}|j|�|j�\}}qW|||fS)Nr�.s..r)rr/r1�append)rr2�listr.rr3rrr�_getlongresp�s zPOP3._getlongrespcCs|j|�|j�S)N)r&r)rrrrr� _shortcmd�s zPOP3._shortcmdcCs|j|�|j�S)N)r&r7)rrrrr�_longcmd�s z POP3._longcmdcCs|jS)N)r)rrrr� getwelcome�szPOP3.getwelcomecCs ||_dS)N)r)r�levelrrr�set_debuglevel�szPOP3.set_debuglevelcCs|jd|�S)zVSend user name, return response (should indicate password required). zUSER %s)r8)r�userrrrr=�sz POP3.usercCs|jd|�S)z�Send password, return response (response includes message count, mailbox size). NB: mailbox is locked by server from here to 'quit()' zPASS %s)r8)rZpswdrrr�pass_�sz POP3.pass_cCsF|jd�}|j�}|jr&tdt|��t|d�}t|d�}||fS)z]Get mailbox status. Result is tuple of 2 ints (message count, mailbox size) ZSTATz*stat*rr')r8�splitrrr�int)rZretvalZretsZnumMessagesZsizeMessagesrrr�stat�s z POP3.statNcCs |dk r|jd|�S|jd�S)aRequest listing, return result. Result without a message number argument is in form ['response', ['mesg_num octets', ...], octets]. Result when a message number argument is given is a single response: the "scan listing" for that message. NzLIST %sZLIST)r8r9)r�whichrrrr6�s z POP3.listcCs|jd|�S)zoRetrieve whole message number 'which'. Result is in form ['response', ['line', ...], octets]. zRETR %s)r9)rrBrrr�retr�sz POP3.retrcCs|jd|�S)zFDelete message number 'which'. Result is 'response'. zDELE %s)r8)rrBrrr�dele�sz POP3.delecCs |jd�S)zXDoes nothing. One supposes the response indicates the server is alive. ZNOOP)r8)rrrr�noopsz POP3.noopcCs |jd�S)z(Unmark all messages marked for deletion.ZRSET)r8)rrrr�rset sz POP3.rsetcCs|jd�}|j�|S)zDSignoff: commit changes on server, unlock mailbox, close connection.ZQUIT)r8�close)rr2rrr�quits z POP3.quitcCs�z |j}d|_|dk r|j�Wd|j}d|_|dk r�zVy|jtj�Wn@tk r�}z$|jtjkrxt |dd�dkrx�WYdd}~XnXWd|j�XXdS)z8Close the connection without assuming anything about it.NZwinerrorri&') rrGrZshutdownrZ SHUT_RDWR�OSError�errnoZENOTCONN�getattr)rrr�excrrrrGsz POP3.closecCs|jd|�S)zNot sure what this does.zRPOP %s)r8)rr=rrr�rpop4sz POP3.rpops\+OK.[^<]*(<.*>)cCs\t||j�}|jj|j�}|s&td��ddl}|jd�|}|j|�j �}|j d||f�S)aAuthorisation - only possible if server has supplied a timestamp in initial greeting. Args: user - mailbox user; password - mailbox password. NB: mailbox is locked by server from here to 'quit()' z!-ERR APOP not supported by serverrNrz APOP %s %s)r!r"� timestamp�matchrr�hashlib�groupZmd5Z hexdigestr8)rr=ZpasswordZsecret�mrPZdigestrrr�apop;sz POP3.apopcCs|jd||f�S)z�Retrieve message header of message number 'which' and first 'howmuch' lines of message body. Result is in form ['response', ['line', ...], octets]. z TOP %s %s)r9)rrBZhowmuchrrr�topPszPOP3.topcCs |dk r|jd|�S|jd�S)z�Return message digest (unique id) list. If 'which', result contains unique id for that message in the form 'response mesgnum uid', otherwise result is the list ['response', ['mesgnum uid', ...], octets] NzUIDL %sZUIDL)r8r9)rrBrrr�uidlYsz POP3.uidlcCs |jd�S)zITry to enter UTF-8 mode (see RFC 6856). Returns server response. ZUTF8)r8)rrrr�utf8esz POP3.utf8c Cstdd�}i}y8|jd�}|d}x |D]}||�\}}|||<q&WWn*tk rn}ztd��WYdd}~XnX|S)aReturn server capabilities (RFC 2449) as a dictionary >>> c=poplib.POP3('localhost') >>> c.capa() {'IMPLEMENTATION': ['Cyrus', 'POP3', 'server', 'v2.2.12'], 'TOP': [], 'LOGIN-DELAY': ['0'], 'AUTH-RESP-CODE': [], 'EXPIRE': ['NEVER'], 'USER': [], 'STLS': [], 'PIPELINING': [], 'UIDL': [], 'RESP-CODES': []} >>> Really, according to RFC 2449, the cyrus folks should avoid having the implementation split into multiple arguments... cSs"|jd�j�}|d|dd�fS)N�asciirr)�decoder?)rZlstrrr� _parsecapxszPOP3.capa.<locals>._parsecapZCAPArz!-ERR CAPA not supported by serverN)r9r) rrY�capsr2ZrawcapsZcaplineZcapnmZcapargsZ_errrrr�capaks z POP3.capacCsxtstd��|jrtd��|j�}d|kr2td��|dkrBtj�}|jd�}|j|j|j d�|_|jj d�|_d|_|S) z{Start a TLS session on the active connection as specified in RFC 2595. context - a ssl.SSLContext z-ERR TLS support missingz$-ERR TLS session already establishedZSTLSz!-ERR STLS not supported by serverN)�server_hostnamerT)�HAVE_SSLrrr[�ssl�_create_stdlib_contextr8�wrap_socketrr rr)r�contextrZr2rrr�stls�s z POP3.stls)N)N)N)'rrr�__doc__r"� POP3_PORTr�_GLOBAL_DEFAULT_TIMEOUTrrr r&r/rr7r8r9r:r<r=r>rAr6rCrDrErFrHrGrMr#�compilerNrSrTrUrVr[rbrrrrr2s@+ c@s8eZdZdZeddejdfdd�Zdd�Zd dd�Z dS) �POP3_SSLaPOP3 client class over SSL connection Instantiate with: POP3_SSL(hostname, port=995, keyfile=None, certfile=None, context=None) hostname - the hostname of the pop3 over ssl server port - port number keyfile - PEM formatted file that contains your private key certfile - PEM formatted certificate chain file context - a ssl.SSLContext See the methods of the parent class POP3 for more documentation. NcCs�|dk r|dk rtd��|dk r0|dk r0td��|dk s@|dk rVddl}|jdtd�||_||_|dkrxtj||d�}||_t j ||||�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)r%�warnings�warn�DeprecationWarningrirhr^r_rarr)rr rrirhrrarjrrrr�szPOP3_SSL.__init__cCs"tj||�}|jj||jd�}|S)N)r\)rrrar`r )rrrrrrr�s zPOP3_SSL._create_socketcCstd��dS)z�The method unconditionally raises an exception since the STLS command doesn't make any sense on an already established SSL/TLS session. z$-ERR TLS session already establishedN)r)rrirhrarrrrb�sz POP3_SSL.stls)NNN) rrrrc� POP3_SSL_PORTrrerrrbrrrrrg�s rg�__main__rr'�zMessage %d:z z-----------------------)'rcrJr#rr^r]�ImportError�__all__� Exceptionrrdrmr-ZLFrr+rrgr5r�sys�argv�arr:r=r>r6rAZnumMsgsZ totalSize�range�irC�header�msgr.rrHrrrr�<module>sJ n0
/home/./../../../lib64/python3.6/venv/../http/../__pycache__/poplib.cpython-36.pyc