⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.127
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib64
/
python3.9
/
__pycache__
/
View File Name :
poplib.cpython-39.opt-1.pyc
a �����DOg^;����������������������@���sj��d�Z�ddlZddlZddlZddlZzddlZdZW�n�eyJ���dZY�n0�ddgZG�dd��de �Z dZd Zd Z dZe e�ZdZG�d d��d�Zer�G�dd��de�Ze�d��edk�rfddlZeejd��Zee�����e�ejd���e�ejd���e����e���\ZZeded��D�]BZ e�!e �\Z"Z#Z$ede ���e#D�]Z%ede%����q>ed���qe�&���dS�)z@A POP3 client class. Based on the J. Myers POP3 draft, Jan. 96 �����NTF�POP3�error_protoc�������������������@���s���e�Zd�ZdS�)r���N)�__name__� __module__�__qualname__��r���r����/usr/lib64/python3.9/poplib.pyr������������n���i������� ���� i���c�������������������@���s��e�Zd�ZdZdZeejfdd�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/��Ze�d0�Z d1d2��Z!d3d4��Z"d>d5d6�Z#d7d8��Z$d9d:��Z%d?d;d<�Z&dS�)@r���aP��This 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-8c�����������������C���sP���||�_�||�_d|�_t�d|�||��|��|�|�_|�j�d�|�_d|�_ |�� ��|�_d�S�)NFzpoplib.connect�rbr���)�host�port�_tls_established�sys�audit�_create_socket�sock�makefile�file� _debugging�_getresp�welcome)�selfr���r����timeoutr���r���r����__init__b���s����z POP3.__init__c�����������������C���s(���|d�ur|st�d��t�|�j|�jf|�S�)Nz0Non-blocking socket (timeout=0) is not supported)� ValueError�socket�create_connectionr���r���)r���r���r���r���r���r���m���s����zPOP3._create_socketc�����������������C���s:���|�j�dkrtdt|���t�d|�|��|�j�|t���d�S�)N����z*put*zpoplib.putline)r����print�reprr���r���r����sendall�CRLF�r����liner���r���r����_putliner���s����z POP3._putlinec�����������������C���s.���|�j�rtdt|���t||�j�}|��|��d�S�)Nz*cmd*)r���r!���r"����bytes�encodingr'���r%���r���r���r����_putcmdz���s����zPOP3._putcmdc�����������������C���s����|�j��td��}t|�tkr$td��|�jdkr<tdt|���|sHtd��t|�}|dd���tkrp|d�d��|fS�|d�d��t kr�|dd��|fS�|d�d��|fS�)Nr ���z line too longz*get*z-ERR EOF������) r����readline�_MAXLINE�lenr���r���r!���r"���r$����CR)r���r&����octetsr���r���r����_getline����s����z POP3._getlinec�����������������C���s:���|�����\}}|�jdkr$tdt|���|�d�s6t|��|S�)Nr ���z*resp*����+)r2���r���r!���r"���� startswithr���)r����resp�or���r���r���r�������s ���� z POP3._getrespc�����������������C���sl���|�����}g�}d}|����\}}|dkrb|�d�rB|d�}|dd���}||�}|�|��|����\}}q|||fS�)Nr�������.s���..r ���)r���r2���r4����append)r���r5����listr1���r&���r6���r���r���r����_getlongresp����s���� zPOP3._getlongrespc�����������������C���s���|���|��|����S��N)r*���r���r%���r���r���r���� _shortcmd����s���� zPOP3._shortcmdc�����������������C���s���|���|��|����S�r;���)r*���r:���r%���r���r���r����_longcmd����s���� z POP3._longcmdc�����������������C���s���|�j�S�r;���)r����r���r���r���r���� getwelcome����s����zPOP3.getwelcomec�����������������C���s ���||�_�d�S�r;���)r���)r����levelr���r���r����set_debuglevel����s����zPOP3.set_debuglevelc�����������������C���s���|���d|��S�)zVSend user name, return response (should indicate password required). zUSER %s�r<����r����userr���r���r���rD�������s����z POP3.userc�����������������C���s���|���d|��S�)z�Send password, return response (response includes message count, mailbox size). NB: mailbox is locked by server from here to 'quit()' zPASS %srB���)r���Zpswdr���r���r����pass_����s����z POP3.pass_c�����������������C���sF���|���d�}|���}|�jr&tdt|���t|d��}t|d��}||fS�)z]Get mailbox status. Result is tuple of 2 ints (message count, mailbox size) ZSTATz*stat*r �������)r<����splitr���r!���r"����int)r���ZretvalZretsZnumMessagesZsizeMessagesr���r���r����stat����s���� z POP3.statNc�����������������C���s ���|dur|���d|��S�|��d�S�)a��Request 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 %s�LIST�r<���r=����r����whichr���r���r���r9�������s���� z POP3.listc�����������������C���s���|���d|��S�)zoRetrieve whole message number 'which'. Result is in form ['response', ['line', ...], octets]. zRETR %s�r=���rL���r���r���r����retr����s����z POP3.retrc�����������������C���s���|���d|��S�)zFDelete message number 'which'. Result is 'response'. zDELE %srB���rL���r���r���r����dele���s����z POP3.delec�����������������C���s ���|���d�S�)zXDoes nothing. One supposes the response indicates the server is alive. ZNOOPrB���r>���r���r���r����noop��s����z POP3.noopc�����������������C���s ���|���d�S�)z(Unmark all messages marked for deletion.ZRSETrB���r>���r���r���r����rset��s����z POP3.rsetc�����������������C���s���|���d�}|�����|S�)zDSignoff: commit changes on server, unlock mailbox, close connection.ZQUIT)r<����close)r���r5���r���r���r����quit��s���� z POP3.quitc�����������������C���s,��z�|�j�}d|�_�|dur|����W�|�j}d|�_|dur�z`z|�tj��W�nB�ty��}�z*|jtjkrtt |dd�dkrt��W�Y�d}~n d}~0�0�W�|����n |����0�n�|�j}d|�_|du�r&zbz|�tj��W�nD�t�y�}�z*|jtjkr�t |dd�dkr���W�Y�d}~n d}~0�0�W�|����n |����0�0�dS�)z8Close the connection without assuming anything about it.N�winerrorr���i&'��) r���rS���r����shutdownr���� SHUT_RDWR�OSError�errnoZENOTCONN�getattr)r���r���r����excr���r���r���rS�����s6���� �� �z POP3.closec�����������������C���s���|���d|��S�)zNot sure what this does.zRPOP %srB���rC���r���r���r����rpop7��s����z POP3.rpops���\+OK.[^<]*(<.*>)c�����������������C���s\���t�||�j�}|�j�|�j�}|s&td��ddl}|�d�|�}|�|�� ��}|�� d||f��S�)a��Authorisation - 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 serverr���Nr ���z APOP %s %s)r(���r)���� timestamp�matchr���r����hashlib�group�md5� hexdigestr<���)r���rD����passwordZsecret�mr_����digestr���r���r����apop>��s����z POP3.apopc�����������������C���s���|���d||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 %srN���)r���rM���Zhowmuchr���r���r����topS��s����zPOP3.topc�����������������C���s ���|dur|���d|��S�|��d�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 %sZUIDLrK���rL���r���r���r����uidl\��s����z POP3.uidlc�����������������C���s ���|���d�S�)zITry to enter UTF-8 mode (see RFC 6856). Returns server response. ZUTF8rB���r>���r���r���r����utf8h��s����z POP3.utf8c�����������������C���s`���dd��}i�}z4|���d�}|d�}|D�]}||�\}}|||<�q$W�n�tyZ���td��Y�n0�|S�)a���Return 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... c�����������������S���s"���|���d����}|d�|dd���fS�)N�asciir���r ���)�decoderG���)r&���Zlstr���r���r���� _parsecap{��s����zPOP3.capa.<locals>._parsecapZCAPAr ���z!-ERR CAPA not supported by server)r=���r���)r���rl����capsr5���ZrawcapsZcaplineZcapnmZcapargsr���r���r����capan��s���� z POP3.capac�����������������C���sx���t�std��|�jrtd��|����}d|vr2td��|du�rBt���}|��d�}|j|�j|�j d�|�_|�j� 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 missing�$-ERR TLS session already establishedZSTLSz!-ERR STLS not supported by serverN�Zserver_hostnamer ���T)�HAVE_SSLr���r���rn����ssl�_create_stdlib_contextr<����wrap_socketr���r���r���r���)r����contextrm���r5���r���r���r����stls���s ���� �z POP3.stls)N)N)N)'r���r���r����__doc__r)���� POP3_PORTr����_GLOBAL_DEFAULT_TIMEOUTr���r���r'���r*���r2���r���r:���r<���r=���r?���rA���rD���rE���rI���r9���rO���rP���rQ���rR���rT���rS���r\����re�compiler]���rf���rg���rh���ri���rn���rv���r���r���r���r���r���3���sB���+� c�������������������@���s8���e�Zd�ZdZeddejdfdd�Zdd��Zd dd�Z dS�) �POP3_SSLa��POP3 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. Nc�����������������C���s����|d�ur|d�urt�d��|d�ur0|d�ur0t�d��|d�us@|d�urVdd�l}|�dtd��||�_||�_|d�u�rxtj||d�}||�_t � |�|||��d�S�)Nz4context and keyfile arguments are mutually exclusivez5context and certfile arguments are mutually exclusiver���zAkeyfile and certfile are deprecated, use a custom context insteadrF���)�certfile�keyfile)r����warnings�warn�DeprecationWarningr~���r}���rr���rs���ru���r���r���)r���r���r���r~���r}���r���ru���r���r���r���r���r������s"������zPOP3_SSL.__init__c�����������������C���s"���t��|�|�}|�jj||�jd�}|S�)Nrp���)r���r���ru���rt���r���)r���r���r���r���r���r���r������s �����zPOP3_SSL._create_socketc�����������������C���s���t�d��dS�)z�The method unconditionally raises an exception since the STLS command doesn't make any sense on an already established SSL/TLS session. ro���N)r���)r���r~���r}���ru���r���r���r���rv������s����z POP3_SSL.stls)NNN) r���r���r���rw���� POP3_SSL_PORTr���ry���r���r���rv���r���r���r���r���r|������s���� r|����__main__r ���rF�������zMessage %d:z z-----------------------)'rw���rY���rz���r���r���rr���rq����ImportError�__all__� Exceptionr���rx���r����r0���ZLFr$���r.���r���r|���r8���r����argv�ar!���r?���rD���rE���r9���rI���ZnumMsgsZ totalSize�range�irO����header�msgr1���r&���rT���r���r���r���r����<module>���sL��� ��p0