HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/__pycache__/poplib.cpython-35.pyc


Fa8
@sdZddlZddlZddlZyddlZdZWnek
rZdZYnXddgZGdddeZ	dZ
d	Zd
ZdZ
ee
ZdZGd
ddZerGdddeZejdedkrddlZeejdZeejejejdejejdejej\ZZxjededD]UZ ej!e \Z"Z#Z$ede xe#D]Z%ede%qWedqtWej&dS)z@A POP3 client class.

Based on the J. Myers POP3 draft, Jan. 96
NTFPOP3error_protoc@seZdZdS)rN)__name__
__module____qualname__rr/usr/lib/python3.5/poplib.pyrsnis
s
ic@seZdZdZdZeejddZddZ	ddZ
d	d
ZddZd
dZ
ddZddZddZddZddZddZddZddZdd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zejd0Z d1d2Z!d3d4Z"dd5d6Z#d7d8Z$d9d:Z%dd;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)NFrbr)
hostport_tls_established_create_socketsockmakefilefile
_debugging_getrespwelcome)selfrrtimeoutrrr__init__as				z
POP3.__init__cCstj|j|jf|S)N)socketZcreate_connectionrr)rrrrrrkszPOP3._create_socketcCs:|jdkr"tdt||jj|tdS)Nz*put*)rprintreprrZsendallCRLF)rlinerrr_putlinensz
POP3._putlinecCs?|jrtdt|t||j}|j|dS)Nz*cmd*)rrrbytesencodingr)rrrrr_putcmdus	zPOP3._putcmdcCs|jjtd}t|tkr4td|jdkrVtdt||shtdt|}|ddtkr|dd|fS|ddt	kr|dd|fS|dd	|fS)
Nrz
line too longz*get*z-ERR EOFr#r$)
rreadline_MAXLINElenrrrrrCR)rroctetsrrr_getlinesz
POP3._getlinecCsS|j\}}|jdkr4tdt||jdsOt||S)Nrz*resp*+)r*rrr
startswithr)rresporrrrsz
POP3._getrespcCs|j}g}d}|j\}}xb|dkr|jdrb|d}|dd}||}|j||j\}}q-W|||fS)Nr.s..r)rr*r,append)rr-listr)rr.rrr_getlongresps


zPOP3._getlongrespcCs|j||jS)N)r!r)rrrrr	_shortcmds
zPOP3._shortcmdcCs|j||jS)N)r!r2)rrrrr_longcmds
z
POP3._longcmdcCs|jS)N)r)rrrr
getwelcomeszPOP3.getwelcomecCs
||_dS)N)r)rlevelrrrset_debuglevelszPOP3.set_debuglevelcCs|jd|S)zVSend user name, return response

        (should indicate password required).
        zUSER %s)r3)ruserrrrr8sz	POP3.usercCs|jd|S)zSend password, return response

        (response includes message count, mailbox size).

        NB: mailbox is locked by server from here to 'quit()'
        zPASS %s)r3)rZpswdrrrpass_sz
POP3.pass_cCsa|jd}|j}|jr7tdt|t|d}t|d}||fS)z]Get mailbox status.

        Result is tuple of 2 ints (message count, mailbox size)
        ZSTATz*stat*rr")r3splitrrrint)rZretvalZretsZnumMessagesZsizeMessagesrrrstats	z	POP3.statNcCs*|dk	r|jd|S|jdS)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)r3r4)rwhichrrrr1s	z	POP3.listcCs|jd|S)zoRetrieve whole message number 'which'.

        Result is in form ['response', ['line', ...], octets].
        zRETR %s)r4)rr=rrrretrsz	POP3.retrcCs|jd|S)zFDelete message number 'which'.

        Result is 'response'.
        zDELE %s)r3)rr=rrrdelesz	POP3.delecCs
|jdS)zXDoes nothing.

        One supposes the response indicates the server is alive.
        ZNOOP)r3)rrrrnoopsz	POP3.noopcCs
|jdS)z(Unmark all messages marked for deletion.ZRSET)r3)rrrrrsetsz	POP3.rsetcCs|jd}|j|S)zDSignoff: commit changes on server, unlock mailbox, close connection.ZQUIT)r3close)rr-rrrquits
z	POP3.quitcCsz,|j}d|_|dk	r+|jWd|j}d|_|dk	rzUy|jtjWn:tk
r}z|jtjkrWYdd}~XnXWd|jXXdS)z8Close the connection without assuming anything about it.N)	rrBrZshutdownrZ	SHUT_RDWROSErrorerrnoZENOTCONN)rrrerrrrBs				z
POP3.closecCs|jd|S)zNot sure what this does.zRPOP %s)r3)rr8rrrrpop/sz	POP3.rpops\+OK.[^<]*(<.*>)cCst||j}|jj|j}|s9tdddl}|jd|}|j|j	}|j
d||fS)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)rr 	timestampmatchrrhashlibgroupZmd5Z	hexdigestr3)rr8ZpasswordZsecretmrJZdigestrrrapop6sz	POP3.apopcCs|jd||fS)zRetrieve message header of message number 'which'
        and first 'howmuch' lines of message body.

        Result is in form ['response', ['line', ...], octets].
        z	TOP %s %s)r4)rr=ZhowmuchrrrtopKszPOP3.topcCs*|dk	r|jd|S|jdS)zReturn 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)r3r4)rr=rrruidlTsz	POP3.uidlcCs
|jdS)zITry to enter UTF-8 mode (see RFC 6856). Returns server response.
        ZUTF8)r3)rrrrutf8`sz	POP3.utf8c	Csdd}i}yJ|jd}|d}x*|D]"}||\}}|||<q5WWn1tk
r}ztdWYdd}~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-|jdj}|d|ddfS)Nasciirr)decoder:)rZlstrrr	_parsecapsszPOP3.capa.<locals>._parsecapZCAPArz!-ERR CAPA not supported by serverN)r4r)	rrScapsr-ZrawcapsZcaplineZcapnmZcapargsZ_errrrrcapafs


z	POP3.capacCststd|jr'td|j}d|krKtd|dkrctj}|jd}|j|jd|j	|_|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 serverNserver_hostnamer
T)HAVE_SSLrr
rUssl_create_stdlib_contextr3wrap_socketrrrr)rcontextrTr-rrrstlss		z	POP3.stls)'rrr__doc__r 	POP3_PORTr_GLOBAL_DEFAULT_TIMEOUTrrrr!r*rr2r3r4r5r7r8r9r<r1r>r?r@rArCrBrGrecompilerHrMrNrOrPrUr\rrrrr2s@+	



	c@sUeZdZdZeddejdddZddZdddddZ	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	r$td|dk	rH|dk	rHtd||_||_|dkr~tjd|d|}||_tj||||dS)Nz4context and keyfile arguments are mutually exclusivez5context and certfile arguments are mutually exclusivecertfilekeyfile)
ValueErrorrdrcrXrYr[rr)rrrrdrcrr[rrrrs				zPOP3_SSL.__init__cCs1tj||}|jj|d|j}|S)NrV)rrr[rZr)rrrrrrrszPOP3_SSL._create_socketcCstddS)zThe 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)rrdrcr[rrrr\sz
POP3_SSL.stls)
rrrr]
POP3_SSL_PORTrr_rrr\rrrrrbs

	rb__main__rr"zMessage %d:z   z-----------------------)'r]rEr`rrXrWImportError__all__	Exceptionrr^rfr(ZLFrr&rrbr0rsysargvarr5r8r9r1r<ZnumMsgsZ	totalSizerangeir>headermsgr)rrCrrrr<module>sH


h,