AlkantarClanX12

Your IP : 18.218.108.24


Current Path : /proc/self/root/opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python33/lib64/python3.3/__pycache__/poplib.cpython-33.pyo

�
��fl,c
@s�dZddlZddlZddgZGdd�de�ZdZdZdZd	Z	ee	Z
d
ZGdd�d�Zyddl
Z
Wnek
r�Yn$XGdd
�d
e�Zejd
�edkr�ddlZeejd�Zeej��ejejd�ejejd�ej�ej�\ZZxjeded�D]UZeje�\Z Z!Z"ede�xe!D]Z#ede#�q�Wed�qVWej$�ndS(u@A POP3 client class.

Based on the J. Myers POP3 draft, Jan. 96
iNuPOP3uerror_protocBs|EeZdZdS(uerror_protoN(u__name__u
__module__u__qualname__(u
__locals__((u+/opt/alt/python33/lib64/python3.3/poplib.pyuerror_protosini�s
s
icBsj|EeZdZdZdZeejdd�Zdd�Z	dd�Z
d	d
�Zdd�Zd
d�Z
dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zd6dd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zej d/�Z!d0d1�Z"d2d3�Z#d6d4d5�Z$d6S(7uPOP3u�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)

    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.
    uUTF-8cCsU||_||_|j|�|_|jjd�|_d|_|j�|_dS(Nurbi(	uhostuportu_create_socketusockumakefileufileu
_debuggingu_getrespuwelcome(uselfuhostuportutimeout((u+/opt/alt/python33/lib64/python3.3/poplib.pyu__init__Vs			u
POP3.__init__cCstj|j|jf|�S(N(usocketucreate_connectionuhostuport(uselfutimeout((u+/opt/alt/python33/lib64/python3.3/poplib.pyu_create_socket_suPOP3._create_socketcCs=|jdkr%tdt|��n|jj|t�dS(Niu*put*(u
_debugginguprintureprusockusendalluCRLF(uselfuline((u+/opt/alt/python33/lib64/python3.3/poplib.pyu_putlinebsu
POP3._putlinecCsB|jrtdt|��nt||j�}|j|�dS(Nu*cmd*(u
_debugginguprintureprubytesuencodingu_putline(uselfuline((u+/opt/alt/python33/lib64/python3.3/poplib.pyu_putcmdis	uPOP3._putcmdcCs�|jjtd�}t|�tkr7td��n|jdkr\tdt|��n|sqtd��nt|�}|dd�tkr�|dd�|fS|dt	kr�|dd	�|fS|dd
�|fS(Niu
line too longu*get*u-ERR EOFiii����i����i����i����(
ufileureadlineu_MAXLINEulenuerror_protou
_debugginguprinturepruCRLFuCR(uselfulineuoctets((u+/opt/alt/python33/lib64/python3.3/poplib.pyu_getlinessu
POP3._getlinecCsY|j�\}}|jdkr7tdt|��n|jd�sUt|��n|S(Niu*resp*s+(u_getlineu
_debugginguprinturepru
startswithuerror_proto(uselfurespuo((u+/opt/alt/python33/lib64/python3.3/poplib.pyu_getresp�su
POP3._getrespcCs�|j�}g}d}|j�\}}xe|dkr�|jd�re|d}|dd�}n||}|j|�|j�\}}q-W|||fS(Nis.s..i(u_getrespu_getlineu
startswithuappend(uselfurespulistuoctetsulineuo((u+/opt/alt/python33/lib64/python3.3/poplib.pyu_getlongresp�s


uPOP3._getlongrespcCs|j|�|j�S(N(u_putcmdu_getresp(uselfuline((u+/opt/alt/python33/lib64/python3.3/poplib.pyu	_shortcmd�s
uPOP3._shortcmdcCs|j|�|j�S(N(u_putcmdu_getlongresp(uselfuline((u+/opt/alt/python33/lib64/python3.3/poplib.pyu_longcmd�s
u
POP3._longcmdcCs|jS(N(uwelcome(uself((u+/opt/alt/python33/lib64/python3.3/poplib.pyu
getwelcome�suPOP3.getwelcomecCs
||_dS(N(u
_debugging(uselfulevel((u+/opt/alt/python33/lib64/python3.3/poplib.pyuset_debuglevel�suPOP3.set_debuglevelcCs|jd|�S(uVSend user name, return response

        (should indicate password required).
        uUSER %s(u	_shortcmd(uselfuuser((u+/opt/alt/python33/lib64/python3.3/poplib.pyuuser�su	POP3.usercCs|jd|�S(u�Send password, return response

        (response includes message count, mailbox size).

        NB: mailbox is locked by server from here to 'quit()'
        uPASS %s(u	_shortcmd(uselfupswd((u+/opt/alt/python33/lib64/python3.3/poplib.pyupass_�su
POP3.pass_cCsd|jd�}|j�}|jr:tdt|��nt|d�}t|d�}||fS(u]Get mailbox status.

        Result is tuple of 2 ints (message count, mailbox size)
        uSTATu*stat*ii(u	_shortcmdusplitu
_debugginguprinturepruint(uselfuretvaluretsunumMessagesusizeMessages((u+/opt/alt/python33/lib64/python3.3/poplib.pyustat�s	u	POP3.statcCs*|dk	r|jd|�S|jd�S(uRequest 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.
        uLIST %suLISTN(uNoneu	_shortcmdu_longcmd(uselfuwhich((u+/opt/alt/python33/lib64/python3.3/poplib.pyulist�s	u	POP3.listcCs|jd|�S(uoRetrieve whole message number 'which'.

        Result is in form ['response', ['line', ...], octets].
        uRETR %s(u_longcmd(uselfuwhich((u+/opt/alt/python33/lib64/python3.3/poplib.pyuretr�su	POP3.retrcCs|jd|�S(uFDelete message number 'which'.

        Result is 'response'.
        uDELE %s(u	_shortcmd(uselfuwhich((u+/opt/alt/python33/lib64/python3.3/poplib.pyudele�su	POP3.delecCs
|jd�S(uXDoes nothing.

        One supposes the response indicates the server is alive.
        uNOOP(u	_shortcmd(uself((u+/opt/alt/python33/lib64/python3.3/poplib.pyunoop�su	POP3.noopcCs
|jd�S(u(Unmark all messages marked for deletion.uRSET(u	_shortcmd(uself((u+/opt/alt/python33/lib64/python3.3/poplib.pyurset�su	POP3.rsetcCs|jd�}|j�|S(uDSignoff: commit changes on server, unlock mailbox, close connection.uQUIT(u	_shortcmduclose(uselfuresp((u+/opt/alt/python33/lib64/python3.3/poplib.pyuquits
u	POP3.quitcCsR|jdk	r|jj�n|jdk	r>|jj�nd|_|_dS(u8Close the connection without assuming anything about it.N(ufileuNoneucloseusock(uself((u+/opt/alt/python33/lib64/python3.3/poplib.pyuclose
s
u
POP3.closecCs|jd|�S(uNot sure what this does.uRPOP %s(u	_shortcmd(uselfuuser((u+/opt/alt/python33/lib64/python3.3/poplib.pyurpopsu	POP3.rpops\+OK.*(<[^>]+>)cCs�t||j�}|jj|j�}|s<td��nddl}|jd�|}|j|�j	�}|j
d||f�S(uAuthorisation

        - 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()'
        u!-ERR APOP not supported by serveriNiu
APOP %s %s(ubytesuencodingu	timestampumatchuwelcomeuerror_protouhashlibugroupumd5u	hexdigestu	_shortcmd(uselfuuserupasswordusecretumuhashlibudigest((u+/opt/alt/python33/lib64/python3.3/poplib.pyuapopsu	POP3.apopcCs|jd||f�S(u�Retrieve message header of message number 'which'
        and first 'howmuch' lines of message body.

        Result is in form ['response', ['line', ...], octets].
        u	TOP %s %s(u_longcmd(uselfuwhichuhowmuch((u+/opt/alt/python33/lib64/python3.3/poplib.pyutop3suPOP3.topcCs*|dk	r|jd|�S|jd�S(u�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]
        uUIDL %suUIDLN(uNoneu	_shortcmdu_longcmd(uselfuwhich((u+/opt/alt/python33/lib64/python3.3/poplib.pyuuidl<su	POP3.uidlN(%u__name__u
__module__u__qualname__u__doc__uencodingu	POP3_PORTusocketu_GLOBAL_DEFAULT_TIMEOUTu__init__u_create_socketu_putlineu_putcmdu_getlineu_getrespu_getlongrespu	_shortcmdu_longcmdu
getwelcomeuset_debugleveluuserupass_ustatuNoneulisturetrudeleunoopursetuquitucloseurpopureucompileu	timestampuapoputopuuidl(u
__locals__((u+/opt/alt/python33/lib64/python3.3/poplib.pyuPOP3*s:(




	cBsD|EeZdZdZeddejddd�Zdd�Z	dS(uPOP3_SSLu�POP3 client class over SSL connection

        Instantiate with: POP3_SSL(hostname, port=995, keyfile=None, certfile=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

        See the methods of the parent class POP3 for more documentation.
        cCs�|dk	r'|dk	r'td��n|dk	rN|dk	rNtd��n||_||_||_tj||||�dS(Nu4context and keyfile arguments are mutually exclusiveu5context and certfile arguments are mutually exclusive(uNoneu
ValueErrorukeyfileucertfileucontextuPOP3u__init__(uselfuhostuportukeyfileucertfileutimeoutucontext((u+/opt/alt/python33/lib64/python3.3/poplib.pyu__init__Zs			uPOP3_SSL.__init__cCsUtj||�}|jdk	r6|jj|�}ntj||j|j�}|S(N(uPOP3u_create_socketucontextuNoneuwrap_socketusslukeyfileucertfile(uselfutimeoutusock((u+/opt/alt/python33/lib64/python3.3/poplib.pyu_create_socketgs
uPOP3_SSL._create_socketN(
u__name__u
__module__u__qualname__u__doc__u
POP3_SSL_PORTuNoneusocketu_GLOBAL_DEFAULT_TIMEOUTu__init__u_create_socket(u
__locals__((u+/opt/alt/python33/lib64/python3.3/poplib.pyuPOP3_SSLMs	uPOP3_SSLu__main__iiiuMessage %d:u   u-----------------------(%u__doc__ureusocketu__all__u	Exceptionuerror_protou	POP3_PORTu
POP3_SSL_PORTuCRuLFuCRLFu_MAXLINEuPOP3ussluImportErroruPOP3_SSLuappendu__name__usysuargvuauprintu
getwelcomeuuserupass_ulistustatunumMsgsu	totalSizeurangeuiuretruheaderumsguoctetsulineuquit(((u+/opt/alt/python33/lib64/python3.3/poplib.pyu<module>s@
�
"