python (3.11.7)

(root)/
lib/
python3.11/
__pycache__/
poplib.cpython-311.pyc

e^;&dZddlZddlZddlZddlZ	ddlZdZn
#e$rdZYnwxYwddgZGdde	Z
dZd	Zd
Z
dZe
ezZdZGd
dZer#GddeZededkrddlZeejdZeeeejdeejdee\ZZededzD]GZ e!e \Z"Z#Z$ede ze#D]Z%ede%zedHe&dSdS)z@A POP3 client class.

Based on the J. Myers POP3 draft, Jan. 96
NTFPOP3error_protoceZdZdS)rN)__name__
__module____qualname__:/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/poplib.pyrrsr
ni

iceZdZdZdZeejfdZdZ	dZ
dZdZdZ
d	Zd
ZdZdZd
ZdZdZdZd!dZdZdZdZdZdZdZdZejdZ dZ!dZ"d!dZ#dZ$dZ%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-8c||_||_d|_tjd||||||_|jd|_d|_	|
|_dS)NFzpoplib.connectrbr)hostport_tls_establishedsysaudit_create_socketsockmakefilefile
_debugging_getrespwelcome)selfrrtimeouts    r__init__z
POP3.__init__bsu		 %	"D$555''00	I&&t,,	}}r
cj||stdtj|j|jf|S)Nz0Non-blocking socket (timeout=0) is not supported)
ValueErrorsocketcreate_connectionrr)rrs  rrzPOP3._create_socketms8wOPPP'DI(>HHHr
c|jdkrtdt|tjd|||j|tzdS)Nz*put*zpoplib.putline)rprintreprrrrsendallCRLFrlines  r_putlinez
POP3._putlinersY?QgtDzz : : :	"D$///	$+&&&&&r
c|jrtdt|t||j}||dS)Nz*cmd*)rr'r(bytesencodingr-r+s  r_putcmdzPOP3._putcmdzsH?6E'4::666T4=))

dr
c|jtdz}t|tkrt	d|jdkrt
dt||st	dt|}|ddtkr|dd|fS|ddtkr|dd|fS|dd|fS)Nr&z
line too longz*get*z-ERR EOF)
rreadline_MAXLINElenrrr'r(r*CR)rr,octetss   r_getlinez
POP3._getlinesy!!(Q,//t99xo...?QgtDzz : : :2;z222T99f$$8r>>":v%%CRCy&  r
c|\}}|jdkrtdt||dst||S)Nr&z*resp*+)r:rr'r(
startswithr)rrespos   rrz
POP3._getresps\--//a?QhT

 ; ; ;t$$	$d###r
c,|}g}d}|\}}|dkr[|dr|dz
}|dd}||z}|||\}}|dk[|||fS)Nr.s..r&)rr:r=append)rr>listr9r,r?s      r_getlongrespzPOP3._getlongresps}}A6--//adllu%%
 aCABBxaZFKKmmooGD!
dllT6!!r
cT|||SN)r1rr+s  r	_shortcmdzPOP3._shortcmds"T}}r
cT|||SrF)r1rDr+s  r_longcmdz
POP3._longcmds&T  """r
c|jSrF)rrs r
getwelcomezPOP3.getwelcomes
|r
c||_dSrF)r)rlevels  rset_debuglevelzPOP3.set_debuglevels
r
c2|d|zS)zVSend user name, return response

        (should indicate password required).
        zUSER %srGrusers  rrSz	POP3.users
~~i$.///r
c2|d|zS)zSend password, return response

        (response includes message count, mailbox size).

        NB: mailbox is locked by server from here to 'quit()'
        zPASS %srQ)rpswds  rpass_z
POP3.pass_s~~i$.///r
c|d}|}|jrtdt	|t|d}t|d}||fS)z]Get mailbox status.

        Result is tuple of 2 ints (message count, mailbox size)
        STATz*stat*r&)rGsplitrr'r(int)rretvalretsnumMessagessizeMessagess     rstatz	POP3.statsh
''||~~?7E(DJJ777$q'll47||\**r
Nc`||d|zS|dS)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 %sLISTrGrIrwhichs  rrCz	POP3.lists3>>)e"3444}}V$$$r
c2|d|zS)zoRetrieve whole message number 'which'.

        Result is in form ['response', ['line', ...], octets].
        zRETR %srIrds  rretrz	POP3.retrs
}}Y.///r
c2|d|zS)zFDelete message number 'which'.

        Result is 'response'.
        zDELE %srQrds  rdelez	POP3.deles
~~i%/000r
c,|dS)zXDoes nothing.

        One supposes the response indicates the server is alive.
        NOOPrQrKs rnoopz	POP3.noops
~~f%%%r
c,|dS)z(Unmark all messages marked for deletion.RSETrQrKs rrsetz	POP3.rsets~~f%%%r
cX|d}||S)zDSignoff: commit changes on server, unlock mailbox, close connection.QUIT)rGclose)rr>s  rquitz	POP3.quits%~~f%%

r
c	|j}d|_|||j}d|_|	|tjnB#t$r5}|jtjkrt|dddkrYd}~nd}~wwxYw|dS#|wxYwdS#|j}d|_|	|tjnB#t$r5}|jtjkrt|dddkrYd}~nd}~wwxYw|w#|wxYwwxYw)z8Close the connection without assuming anything about it.Nwinerrorri&')
rrsrshutdownr#	SHUT_RDWROSErrorerrnoENOTCONNgetattr)rrrexcs    rrsz
POP3.closes	!9DDI

9DDI
!MM&"23333	U^33"3
A66%??
JJLLLLLDJJLLLL 9DDI
!MM&"23333	U^33"3
A66%??
JJLLLLDJJLLLL sv$C
AB/
B!+BB/BB//C
E-C<;E<
D;+D61E6D;;E>E-E))E-c2|d|zS)zNot sure what this does.zRPOP %srQrRs  rrpopz	POP3.rpop7s~~i$.///r
s\+OK.[^<]*(<.*>)cHt||j}|j|j}|stdddl}|d|z}||	}|
d|d|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 serverrNr&zAPOP  )r/r0	timestampmatchrrhashlibgroupmd5	hexdigestrG)rrSpasswordsecretmrdigests       rapopz	POP3.apop>sx//N  ..	CABBBF"V$$..00~~~dddFF;<<<r
c8|d|d|S)zRetrieve message header of message number 'which'
        and first 'howmuch' lines of message body.

        Result is in form ['response', ['line', ...], octets].
        zTOP rrg)rrehowmuchs   rtopzPOP3.topSs#}}}EEE77;<<<r
c`||d|zS|dS)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 %sUIDLrcrds  ruidlz	POP3.uidl\s3>>)e"3444}}V$$$r
c,|dS)zITry to enter UTF-8 mode (see RFC 6856). Returns server response.
        UTF8rQrKs rutf8z	POP3.utf8hs~~f%%%r
cd}i}	|d}|d}|D]}||\}}|||<n#t$rtdwxYw|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...
        ct|d}|d|ddfS)Nasciirr&)decoderZ)r,lsts  r	_parsecapzPOP3.capa.<locals>._parsecap{s5++g&&,,..Cq63qrr7?"r
CAPAr&z!-ERR CAPA not supported by server)rIr)rrcapsr>rawcapscaplinecapnmcapargss        rcapaz	POP3.capans	#	#	#	C==((D1gG"
&
&!*7!3!3w%U
&	C	C	CABBB	Cs	5=Actstd|jrtd|}d|vrtd|t	j}|d}||j|j	|_|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 establishedSTLSz!-ERR STLS not supported by serverNserver_hostnamerT)HAVE_SSLrrrssl_create_stdlib_contextrGwrap_socketrrrr)rcontextrr>s    rstlsz	POP3.stlss
	:8999 	FDEEEyy{{~~ABBB?022G~~f%%''	8<	(CC	I&&t,,	 $r
rF)'rrr__doc__r0	POP3_PORTr#_GLOBAL_DEFAULT_TIMEOUTr rr-r1r:rrDrGrIrLrOrSrVr`rCrhrjrmrprtrsrrecompilerrrrrrrr	r
rrr3s))VH"+7	'	'	'	'III
'''!!!*""" ###   000000
+
+
+%%%%000111&&&&&&
!!!8000

/00I===*===	%	%	%	%&&&:r
c<eZdZdZeddejdfdZdZddZ	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.
        Nc.||td||td|| ddl}|dtd||_||_|t
j||}||_t
||||dS)Nz4context and keyfile arguments are mutually exclusivez5context and certfile arguments are mutually exclusiverzAkeyfile and certfile are deprecated, use a custom context insteadrY)certfilekeyfile)r"warningswarnDeprecationWarningrrrrrrr )rrrrrrrrs        rr zPOP3_SSL.__init__s"w': "-..."x'; "-..."h&:

78JAOOO"DL$DM4h=DFFF"DLMM$dG44444r
c~t||}|j||j}|S)Nr)rrrrr)rrrs   rrzPOP3_SSL._create_socketsA&&tW55D<++D<@I,GGDKr
c td)zThe method unconditionally raises an exception since the
            STLS command doesn't make any sense on an already established
            SSL/TLS session.
            r)r)rrrrs    rrz
POP3_SSL.stlss
DEEEr
)NNN)
rrrr
POP3_SSL_PORTr#rr rrr	r
rrrsl		'4TD#;T	5	5	5	5(				F	F	F	F	F	Fr
r__main__r&rYzMessage %d:z   z-----------------------)'rrzrr#rrrImportError__all__	Exceptionrrrr8LFr*r6rrrBrargvar'rLrSrVrCr`numMsgs	totalSizerangeirhheadermsgr9r,rtr	r
r<module>rso
				







JJJHHHHH-
 #"""")"""
	

	"ukkkkkkkk\2.F.F.F.F.F4.F.F.F`NN:zJJJSXa[A	E!,,..FF38A;GGCHQKFFHHH6688Wi
U1gk
"
")) !q		f
ma   	 	 DE%$,
'((((FFHHHHHs%%