AlkantarClanX12
Current Path : /opt/alt/python37/lib64/python3.7/__pycache__/ |
Current File : //opt/alt/python37/lib64/python3.7/__pycache__/poplib.cpython-37.opt-2.pyc |
B YI~dt: � @ sh d dl Z d dlZd dlZyd dlZdZW n ek r@ dZY nX ddgZG dd� de�ZdZ dZ d Zd Zee Z dZG dd� d�Zer�G d d� de�Ze�d� edk�rdd dlZeejd �Zee�� � e�ejd � e�ejd � e�� e�� \ZZxXeded �D ]FZe� e�\Z!Z"Z#ede � xe"D ]Z$ede$ � �q8W ed� �qW e�%� dS )� NTF�POP3�error_protoc @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r r �+/opt/alt/python37/lib64/python3.7/poplib.pyr s �n i� � � i c @ s e Zd ZdZeejfdd�Zdd� Zdd� Z dd � Z d d� Zdd � Zdd� 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 )?r zUTF-8c C s@ || _ || _d| _| �|�| _| j�d�| _d| _| �� | _ d S )NF�rbr ) �host�port�_tls_established�_create_socket�sock�makefile�file� _debugging�_getresp�welcome)�selfr r �timeoutr r r �__init__a s z POP3.__init__c C s t �| j| jf|�S )N)�socketZcreate_connectionr r )r r r r r r k s zPOP3._create_socketc C s, | j dkrtdt|�� | j�|t � d S )N� z*put*)r �print�reprr Zsendall�CRLF)r �liner r r �_putlinen s z POP3._putlinec C s. | j rtdt|�� t|| j�}| �|� d S )Nz*cmd*)r r r �bytes�encodingr )r r r r r �_putcmdu 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*� +)r+ r r r � startswithr )r �resp�or r r r � s z POP3._getrespc C sp | � � }g }d}| �� \}}xH|dkrd|�d�rD|d }|dd � }|| }|�|� | �� \}}qW |||fS )Nr � .s ..r )r r+ r- �append)r r. �listr* r r/ r r r �_getlongresp� s zPOP3._getlongrespc C s | � |� | �� S )N)r# r )r r r r r � _shortcmd� s zPOP3._shortcmdc C s | � |� | �� S )N)r# r3 )r r r r r �_longcmd� s z POP3._longcmdc C s | j S )N)r )r r r r � getwelcome� s zPOP3.getwelcomec C s || _ d S )N)r )r �levelr r r �set_debuglevel� s zPOP3.set_debuglevelc C s | � d| �S )NzUSER %s)r4 )r �userr r r r9 � s z POP3.userc C s | � d| �S )NzPASS %s)r4 )r Zpswdr r r �pass_� s z POP3.pass_c C sF | � d�}|�� }| jr&tdt|�� t|d �}t|d �}||fS )NZSTATz*stat*r � )r4 �splitr r r �int)r ZretvalZretsZnumMessagesZsizeMessagesr r r �stat� s z POP3.statNc C s |d k r| � d| �S | �d�S )NzLIST %sZLIST)r4 r5 )r �whichr r r r2 � s z POP3.listc C s | � d| �S )NzRETR %s)r5 )r r? r r r �retr� s z POP3.retrc C s | � d| �S )NzDELE %s)r4 )r r? r r r �dele� s z POP3.delec C s | � d�S )NZNOOP)r4 )r r r r �noop s z POP3.noopc C s | � d�S )NZRSET)r4 )r r r r �rset s z POP3.rsetc C s | � d�}| �� |S )NZQUIT)r4 �close)r r. r r r �quit s z POP3.quitc C s� z | j }d | _ |d k r|�� W d | j}d | _|d k r�zVy|�tj� W n@ tk r� } z"|jtjkrxt |dd�dkrx� W d d }~X Y nX W d |�� X X d S )NZwinerrorr i&'