403Webshell
Server IP : 178.105.222.151  /  Your IP : 216.73.216.38
Web Server : nginx/1.28.3
System : Linux MNK 7.0.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Wed Apr 22 16:06:43 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.5.4
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/thread-self/root/lib/python3.14/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/lib/python3.14/__pycache__/imaplib.cpython-314.pyc
+
��3j��	�RtRt^RIt^RIt^RIt^RIt^RIt^RIt^RIt^RI	t	^RI
t
^RIHtHtH
t
^RIHt^RItRt.RjOtR	t^t^�tR
tRktRt/RRlbRRmbRRnbRRobRRobRRobRRlbRRlbRRlbRRpbRRlbRRobRRobRRlbRRlbRRlbRRlb/RRlbR RlbR!RlbR"RmbRRnbR#RlbR$RobR%RlbR&RnbR'RobR(RpbR)RlbR*RobR+RlbR,RlbR-RlbR.RlbCR/RoR0RmR1RlR2RoR3RlR4RoR5RoR6RlR7Ro/	Ct]P6!R84t]P6!R94t]P6!R:4t]P6!R;]P>4t ]P6!R<4t!]P6!R=4t"]P6!R>4t#]P6!R?]P>4t$R;t%R?t&!R@R4t'!RARB4t(]'d!RCRD]'4t)]PURD4!RER]'4t+!RFRG4t,RHP[RI4t.]/!].RJ,4UUu/uFwrVPa4V^,bK	uppt1RKt2RLt3RMt4RNt5]6RO8XEd7^RI7t7^RI8t8]7Pn!]PrRJ,RP4wt:t;Rt>]:F/wt?t=]?RQ8Xd]@!]=4tK]?RR8XgK ]=t>];'dK,]>3t;K1	];'gRrt;];^,tA]8P�!4tC]8Pp!RS]C:RT]A;'gRU:RV24tDRWRX]CRYRZ/,tER[]C]D33RsRtRuR]R\RR]E33RvRwRxRyRzR{R|R}R~3tFRR�R�R�R]RRR]E33R}R�3tGR`tH]>'d
]+!]>4tIM]'!]A4tI]IP�R
8Xd
]FRJ,tF]IP�Ra]IP�,4]IP�Rb]IP�:24]FFwtNt;]H!]N];4K	]H!R^R�4FQtO]P�!Rc]O4tQ]Q'd]QP�^4tSM]OP[4R�,tS]H!Rd]S34KS	]GFUwtNt;]H!]N];4tT]N];3R�8wdK]TR�,P[4tU]U'gK;]H!R_RRe]UR�,,Rf34KW	]V!Rg4R#R# ]dRtEL'i;iuuppi ]7Pxdt=RqRqut:t;Rt=A=EL:Rt=A=ii;i ]V!Rh4]'g!]V!Ri]Pr^,,4h;i)�z�IMAP4 client.

Based on RFC 2060.

Public class:           IMAP4
Public variable:        Debug
Public functions:       Internaldate2tuple
                        Int2AP
                        ParseFlags
                        Time2Internaldate
z2.60N)�datetime�timezone�	timedelta)�DEFAULT_BUFFER_SIZETF�IMAP4�IMAP4_stream�
i�i@B�APPEND�AUTH�AUTHENTICATE�
CAPABILITY�LOGOUT�CHECK�CLOSE�COPY�CREATE�DELETE�	DELETEACL�ENABLE�EXAMINE�EXPUNGE�FETCH�GETACL�
GETANNOTATION�GETQUOTA�GETQUOTAROOT�IDLE�MYRIGHTS�LIST�LOGIN�LSUB�MOVE�	NAMESPACE�NOOP�PARTIAL�	PROXYAUTH�RENAME�SEARCH�SELECT�SETACL�
SETANNOTATION�SETQUOTA�SORT�STARTTLS�STATUS�STORE�	SUBSCRIBE�THREAD�UID�UNSUBSCRIBE�UNSELECTs\+( (?P<data>.*))?s.*FLAGS \((?P<flags>[^\)]*)\)s�.*INTERNALDATE "(?P<day>[ 0123][0-9])-(?P<mon>[A-Z][a-z][a-z])-(?P<year>[0-9][0-9][0-9][0-9]) (?P<hour>[0-9][0-9]):(?P<min>[0-9][0-9]):(?P<sec>[0-9][0-9]) (?P<zonen>[-+])(?P<zoneh>[0-9][0-9])(?P<zonem>[0-9][0-9])"s.*{(?P<size>\d+)}$s
\r\n|\r|\ns%\[(?P<type>[A-Z-]+)( (?P<data>.*))?\]s$\* (?P<type>[A-Z-]+)( (?P<data>.*))?s3\* (?P<data>\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?c�a�]tRt^�toRt!RR]4t!RR]4t!RR]4t!RR	]	4t
R
]R3RltR
t
RtRtRtRtRtRtR
]R3Rlt]R4tRtRtRtRtRtRtRtRtRtRt R t!R!t"R"t#R#t$R$t%R%t&R&t'R't(R(t)R)t*R*t+R+t,R,t-R[R-lt.R\R.lt/R/t0R0t1R1t2R2t3R\R3lt4R4t5R5t6R6t7R7t8R8t9R9t:R:t;R]R;lt<R<t=R=t>R>t?R?t@R[R@ltARAtBRBtCRCtDRDtEREtFRFtGRGtHRHtIRItJRJtKRKtLRLtMRMtNR^RNltOR^ROltPRPtQRQtRRRtSRStTRTtURUtVR[RVltWRWtXRXtYRYtZRZt[Vt\R#)_raIMAP4 client class.

Instantiate with: IMAP4([host[, port[, timeout=None]]])

        host - host's name (default: localhost);
        port - port number (default: standard IMAP4 port).
        timeout - socket timeout (default: None)
                  If timeout is not given or is None,
                  the global default socket timeout is used

All IMAP4rev1 commands are supported by methods of the same
name (in lowercase).

All arguments to commands are converted to strings, except for
AUTHENTICATE, and the last argument to APPEND which is passed as
an IMAP4 literal.  If necessary (the string contains any
non-printing characters or white-space and isn't enclosed with
either parentheses or double quotes) each string is quoted.
However, the 'password' argument to the LOGIN command is always
quoted.  If you want to avoid having an argument string quoted
(eg: the 'flags' argument to STORE) then enclose the string in
parentheses (eg: "(\Deleted)").

Each command returns a tuple: (type, [data, ...]) where 'type'
is usually 'OK' or 'NO', and 'data' is either the text from the
tagged response, or untagged results from command. Each 'data'
is either a string, or a tuple. If a tuple, then the first part
is the header of the response, and the second part contains
the data (ie: 'literal' value).

Errors raise the exception class <instance>.error("<reason>").
IMAP4 server errors raise <instance>.abort("<reason>"),
which is a sub-class of 'error'. Mailbox status changes
from READ-WRITE to READ-ONLY raise the exception class
<instance>.readonly("<reason>"), which is a sub-class of 'abort'.

"error" exceptions imply a program error.
"abort" exceptions imply the connection should be reset, and
        the command re-tried.
"readonly" exceptions imply the command should be re-tried.

Note: to use this module, you must read the RFCs pertaining to the
IMAP4 protocol, as the semantics of the arguments to each IMAP4
command are left to the invoker, not to mention the results. Also,
most IMAP servers implement a sub-set of the commands available here.
c��]tRt^�tRtR#)�IMAP4.error�N��__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r8��/usr/lib/python3.14/imaplib.py�errorr7�s��Dr?rAc��]tRt^�tRtR#)�IMAP4.abortr8Nr9r8r?r@�abortrC�s��r?rDc��]tRt^�tRtR#)�IMAP4.readonlyr8Nr9r8r?r@�readonlyrF�s��4r?rGc��]tRt^�tRtR#)�IMAP4._responsetimeoutr8Nr9r8r?r@�_responsetimeoutrI�s��$r?rJ�Nc��\VnRVnRVn/Vn/VnRVn.VnRVnRVn	^Vn
RVnVP4.Vn
VPWV4VP4R# \ d%TP#4h \$dhi;ii;i)r
NrKF)�Debug�debug�state�literal�tagged_commands�untagged_responses�continuation_response�_idle_responses�
_idle_capture�is_readonly�tagnum�_tls_established�_mode_ascii�_readbuf�open�_connect�	Exception�shutdown�OSError��self�host�port�timeouts&&&&r@�__init__�IMAP4.__init__�s�����
���
����!���"$���%'��"�!���"��� ������ %���������
�	
�	�	�$�g�&�	��M�M�O���	�
��
�
��
���
���
��	�s0�<B�B=�B+�*B=�+B9�6B=�8B9�9B=c���RVnRVn\P!\\P
4Vn\P!\\P
4VnR#)F�asciiN)	�utf8_enabled�	_encoding�re�compile�_Literal�ASCII�Literal�_Untagged_status�Untagged_status�ras&r@rY�IMAP4._mode_ascii�s?��!��� ����z�z�(�B�H�H�5���!�z�z�*:�B�H�H�E��r?c��RVnRVn\P!\4Vn\P!\4VnR#)T�utf-8N)rirjrkrlrmrorprqrrs&r@�
_mode_utf8�IMAP4._mode_utf8�s3�� ��� ����z�z�(�+���!�z�z�*:�;��r?c�N�\\P!RR44Vn\P
!RVP,R,\P4Vn^
Vn^Vn	/Vn
VP^8�d?VPR\,4VPRVP,4VP4VnRVP 9d	RVnM4RVP 9d	R	VnMVP%VP4hVP'4VP^8�d VPR
VP(:24\*FpWP(9gKWnR#	VP%R4h)
ii��s(?P<tag>s"\d+) (?P<type>[A-Z]+) (?P<data>.*)zimaplib version %sznew IMAP4 connection, tag=%s�PREAUTHr
�OK�NONAUTHzCAPABILITIES: Nzserver not IMAP4 compliant)�Int2AP�random�randint�tagprerkrlrn�tagre�_cmd_log_len�_cmd_log_idx�_cmd_logrN�_mesg�__version__�
_get_response�welcomerRrOrA�_get_capabilities�capabilities�AllowedVersions�PROTOCOL_VERSION)ra�versions& r@r\�IMAP4._connect�sI���V�^�^�D�%�8�9����Z�Z���+�+�!&�@�!A�BD�(�(�L��
�� "�D�� !�D���D�M��z�z�Q���
�
�/�+�=�>��
�
�9�D�K�K�G�H��)�)�+�����/�/�/��D�J�
�T�,�,�
,�"�D�J��*�*�T�\�\�*�*���� ���z�z�Q���
�
��1B�1B�D�E�&�G��/�/�/��$+�!��	'��j�j�5�6�6r?c�n�V\9d\WP44#\RV,4h)zUnknown IMAP4 command: '%s')�Commands�getattr�lower�AttributeError)ra�attrs&&r@�__getattr__�IMAP4.__getattr__s,���8���4����.�.��:�T�A�B�Br?c��V#�Nr8rrs&r@�	__enter__�IMAP4.__enter__����r?c�r�VPR8XdR#VP4R# \dR#i;i)r
N)rO�logoutr_)ra�argss&*r@�__exit__�IMAP4.__exit__s1���:�:��!��	��K�K�M���	��	�s�'�6�6c�B�VeV'g\R4hVP'gRMVPp\P!RWPVP4W P3pVe\
P!W14#\
P!V4#)Nz0Non-blocking socket (timeout=0) is not supportedzimaplib.open)�
ValueErrorrb�sys�auditrc�socket�create_connection)rardrb�addresss&&  r@�_create_socket�IMAP4._create_socket)sw����w��O�P�P��9�9�9�t�$�)�)���	�	�.�$�	�	�4�9�9�=����#�����+�+�G�=�=��'�'��0�0r?c��WnW nVPV4VnVPP	R4VnR#)z�Setup connection to remote server on "host:port"
    (default: localhost:standard IMAP4 port).
This connection will be used by the routines:
    read, readline, send, shutdown.
�rbN)rbrcr��sock�makefile�_filer`s&&&&r@r[�
IMAP4.open6s6���	��	��'�'��0��	��Y�Y�'�'��-��
r?c�R�^RIpVPR\^R7VP#)�Nz@IMAP4.file is unsupported, can cause errors, and may be removed.)�
stacklevel)�warnings�warn�RuntimeWarningr�)rar�s& r@�file�
IMAP4.fileBs-��	��
�
�N���	�	��z�z�r?c�D�.pV^8�d�\V4\VP48dVP\V4,pMDVPP\4pT'gM�TPP
T4\V4V8�d=VP
VRV4W1R.VP\V4R,VnM%VP
V4V\V4,pK�RPV4# \
dKi;i)�Read 'size' bytes from remote.Nr?)�lenrZr��recvr�ConnectionError�append�join)ra�size�parts�bufs&&  r@�read�
IMAP4.readSs������Q�h��5�z�C��
�
�.�.��m�m�C��J�/����)�)�.�.�)<�=�C����
�
�$�$�S�)��3�x�4�����S��$�Z�(�!$�U���t�}�}�S��Z�[�/I� I��
���L�L����C��H��D��x�x�����'����s�D�D�Dc���Rp.p^pV\8Ed\V4\VP48dVP\V4,pMDVPP	\
4pT'gM�TPPT4VPV4pVR8wdFV^,
pVPVRV4WER.VP\V4R,VnM&VPV4V\V4,
pEKRPV4p\V4\8�dVPR\,4hV# \dKQi;i)�Read line from remote.�
Nr?zgot more than %d bytes���)�_MAXLINEr�rZr�r�rr�r��findr�rA)ra�LFr��lengthr��pos�lines&      r@�readline�IMAP4.readline{s(���������x���5�z�C��
�
�.�.��m�m�C��J�/����)�)�.�.�)<�=�C����
�
�$�$�S�)��(�(�2�,�C��b�y��q������S��#�Y�'�!$�T���d�m�m�C��J�K�.H� H��
���L�L����c�#�h��F��x�x�����t�9�x���*�*�5��@�A�A����%'����s�E�E,�+E,c�j�\P!RW4VPPV4R#)�Send data to remote.zimaplib.sendN)r�r�r��sendall�ra�datas&&r@�send�
IMAP4.send�s"���	�	�.�$�-��	�	���$�r?c��VPP4VPP\P
4VPP4R# \d=pTP\P8wd\TR^4R8wdhRp?L^Rp?ii;i TPP4i;i)� Close I/O established in "open".�winerrori&'N)
r��closer�r^r��	SHUT_RDWRr_�errno�ENOTCONNr�)ra�excs& r@r^�IMAP4.shutdown�s����
�
����
	��I�I���v�/�/�0�
�I�I�O�O����	��	�	�U�^�^�+��3�
�A�.�%�7����
	��
�I�I�O�O��s)�)A!�!B(�,2B#�B+�#B(�(B+�+Cc��VP#)zVReturn socket instance used to connect to IMAP4 server.

socket = <instance>.socket()
)r�rrs&r@r��IMAP4.socket�s��
�y�y�r?c��RpVPRR.V4wr#VR,'dW#3#VP4wr#VPW#V4#)z�Return most recent 'RECENT' responses if any exist,
else prompt server for an update using the 'NOOP' command.

(typ, [data]) = <instance>.recent()

'data' is None if no new messages,
else list of RECENT responses, most recent last.
�RECENTrzNr�)�_untagged_response�noop�ra�name�typ�dats&   r@�recent�IMAP4.recent�sQ�����*�*�4�$���>����r�7�7��8�O��9�9�;����&�&�s��6�6r?c�F�VPVR.VP44#)z�Return data for response 'code' if received, or None.

Old value for response 'code' is cleared.

(code, [data]) = <instance>.response(code)
N)r��upper)ra�codes&&r@�response�IMAP4.response�s!���&�&�t�d�V�T�Z�Z�\�B�Br?c��RpV'gRpV'd"V^,VR,3R8wd
RV,pMRpV'd
\V4pMRp\P\V4pW`nVPWQW#4#)z�Append message to named mailbox.

(typ, [data]) = <instance>.append(mailbox, flags, date_time, message)

        All args except 'message' can be None.
r	�INBOX�(%s)Nr���(�))�Time2Internaldate�MapCRLF�sub�CRLFrP�_simple_command)ra�mailbox�flags�	date_time�messager�rPs&&&&&  r@r��IMAP4.append�sr������G���a���r��#�y�0�������E��)�)�4�I��I��+�+�d�G�,�����#�#�D�5�D�Dr?c���VP4p\V4PVnVP	RV4wrEVR8wd)VPVR,P
RR44hRVnWE3#)a#Authenticate command - requires response processing.

'mechanism' specifies which authentication mechanism is to
be used - it must appear in <instance>.capabilities in the
form AUTH=<mechanism>.

'authobject' must be a callable object:

        data = authobject(response)

It will be called to process server continuation responses; the
response argument it is passed will be a bytes.  It should return bytes
data that will be base64 encoded and sent to the server.  It should
return None if the client abort response '*' should be sent instead.
rrzru�replacer
r�)r��_Authenticator�processrPr�rA�decoderO)ra�	mechanism�
authobject�mechr�r�s&&&   r@�authenticate�IMAP4.authenticate�sk�� ��� ��
&�j�1�9�9����'�'���=����$�;��*�*�S��W�^�^�G�Y�?�@�@���
��x�r?c�P�RpVPV4wr#VPW#V4#)zL(typ, [data]) = <instance>.capability()
Fetch capabilities list from server.r�r�r�r�s&   r@�
capability�IMAP4.capabilitys.�����'�'��-����&�&�s��6�6r?c�$�VPR4#)zBCheckpoint mailbox on server.

(typ, [data]) = <instance>.check()
r�r�rrs&r@�check�IMAP4.checks��
�#�#�G�,�,r?c�V�VPR4wrRVnW3# RTni;i)z�Close currently selected mailbox.

Deleted messages are removed from writable mailbox.
This is the recommended command before 'LOGOUT'.

(typ, [data]) = <instance>.close()
rr
�r�rO�rar�r�s&  r@r��IMAP4.close&s2��	 ��+�+�G�4�H�C��D�J��x��� �D�J����	(c�&�VPRW4#)zrCopy 'message_set' messages onto end of 'new_mailbox'.

(typ, [data]) = <instance>.copy(message_set, new_mailbox)
rr)ra�message_set�new_mailboxs&&&r@�copy�
IMAP4.copy5s��
�#�#�F�K�E�Er?c�&�VPRV4#)z@Create new mailbox.

(typ, [data]) = <instance>.create(mailbox)
rr�rar�s&&r@�create�IMAP4.create=���
�#�#�H�g�6�6r?c�&�VPRV4#)z@Delete old mailbox.

(typ, [data]) = <instance>.delete(mailbox)
rrrs&&r@�delete�IMAP4.deleteEr r?c�&�VPRW4#)zpDelete the ACLs (remove any rights) set for who on mailbox.

(typ, [data]) = <instance>.deleteacl(mailbox, who)
rr)rar��whos&&&r@�	deleteacl�IMAP4.deleteaclLs��
�#�#�K��>�>r?c���RVP9d\PR4hVPRV4wr#VR8Xd&RVP	49dVP4W#3#)z\Send an RFC5161 enable string to the server.

(typ, [data]) = <instance>.enable(capability)
rzServer does not support ENABLErzzUTF8=ACCEPT)r�rrAr�r�rv)rarr�r�s&&  r@�enable�IMAP4.enableSs_��
�4�,�,�,��+�+�>�?�?��(�(��:�>�	���$�;�=�J�,<�,<�,>�>��O�O���y�r?c�P�RpVPV4wr#VPW#V4#)z�Permanently remove deleted items from selected mailbox.

Generates 'EXPUNGE' response for each deleted message.

(typ, [data]) = <instance>.expunge()

'data' is list of 'EXPUNGE'd message numbers in order received.
rrr�s&   r@�expunge�
IMAP4.expunge_s.�����'�'��-����&�&�s��6�6r?c�R�RpVPW1V4wrEVPWEV4#)z�Fetch (parts of) messages.

(typ, [data, ...]) = <instance>.fetch(message_set, message_parts)

'message_parts' should be a string of selected parts
enclosed in parentheses, eg: "(UID BODY[TEXT])".

'data' are tuples of message part envelope and data.
rr)rar�
message_partsr�r�r�s&&&   r@�fetch�IMAP4.fetchms0�����'�'��=�I����&�&�s��6�6r?c�N�VPRV4wr#VPW#R4#)zHGet the ACLs for a mailbox.

(typ, [data]) = <instance>.getacl(mailbox)
r�ACLr�rar�r�r�s&&  r@�getacl�IMAP4.getacl|s+��
�'�'��'�:����&�&�s��7�7r?c�P�VPRWV4wrEVPWER4#)zY(typ, [data]) = <instance>.getannotation(mailbox, entry, attribute)
Retrieve ANNOTATIONs.r�
ANNOTATIONr)rar��entry�	attributer�r�s&&&&  r@�
getannotation�IMAP4.getannotation�s-���'�'����S����&�&�s��>�>r?c�N�VPRV4wr#VPW#R4#)z�Get the quota root's resource usage and limits.

Part of the IMAP4 QUOTA extension defined in rfc2087.

(typ, [data]) = <instance>.getquota(root)
r�QUOTAr)ra�rootr�r�s&&  r@�getquota�IMAP4.getquota�s+���'�'�
�D�9����&�&�s��9�9r?c��VPRV4wr#VPW#R4wr$VPW#R4wr%W%V.3#)z�Get the list of quota roots for the named mailbox.

(typ, [[QUOTAROOT responses...], [QUOTA responses]]) = <instance>.getquotaroot(mailbox)
rr>�	QUOTAROOTr)rar�r�r��quota�	quotaroots&&    r@�getquotaroot�IMAP4.getquotaroot�sN��
�'�'���@����,�,�S�w�?�
���0�0��;�G�����&�&�&r?c��\W4#)a+Return an iterable IDLE context manager producing untagged responses.
If the argument is not None, limit iteration to 'duration' seconds.

with M.idle(duration=29 * 60) as idler:
    for typ, data in idler:
        print(typ, data)

Note: 'duration' requires a socket connection (not IMAP4_stream).
)�Idler)ra�durations&&r@�idle�
IMAP4.idle�s���T�$�$r?c�R�RpVPW1V4wrEVPWEV4#)z�List mailbox names in directory matching pattern.

(typ, [data]) = <instance>.list(directory='""', pattern='*')

'data' is list of LIST responses.
rr�ra�	directory�patternr�r�r�s&&&   r@�list�
IMAP4.list��0�����'�'���A����&�&�s��6�6r?c��VPRWPV44wr4VR8wdVPVR,4hRVnW43#)z|Identify client using plaintext password.

(typ, [data]) = <instance>.login(user, password)

NB: 'password' will be quoted.
rrzr
r�)r��_quoterArO)ra�user�passwordr�r�s&&&  r@�login�IMAP4.login�sI���'�'���{�{�8�7L�M����$�;��*�*�S��W�%�%���
��x�r?c�V�WuVnVnVPRVP4#)zaForce use of CRAM-MD5 authentication.

(typ, [data]) = <instance>.login_cram_md5(user, password)
zCRAM-MD5)rVrWr�_CRAM_MD5_AUTH)rarVrWs&&&r@�login_cram_md5�IMAP4.login_cram_md5�s+��
$(� ��	�4�=�� � ��T�-@�-@�A�Ar?c�>�^RIp\VP\4'dVPP	R4pMVPpVPW1R4pTPRTP42# \dTPR4hi;i)z0Authobject to use with CRAM-MD5 authentication. Nru�md5z(CRAM-MD5 authentication is not supported� )
�hmac�
isinstancerW�str�encode�HMACr�rArV�	hexdigest)ra�	challengerarW�authcodes&&   r@r[�IMAP4._CRAM_MD5_AUTH�s�����d�m�m�S�)�)��}�}�+�+�G�4�H��}�}�H�	I��y�y��e�<�H��)�)��A�h�0�0�2�3�4�4���	I��*�*�G�H�H�	I�s�A?�?Bc�\�RVnVPR4wrVP4W3#)zdShutdown connection to server.

(typ, [data]) = <instance>.logout()

Returns server 'BYE' response.
r
)rOr�r^rs&  r@r��IMAP4.logout�s-����
��'�'��1����
�
���x�r?c�R�RpVPW1V4wrEVPWEV4#)z�List 'subscribed' mailbox names in directory matching pattern.

(typ, [data, ...]) = <instance>.lsub(directory='""', pattern='*')

'data' are tuples of message part envelope and data.
r rrNs&&&   r@�lsub�
IMAP4.lsub�rSr?c�N�VPRV4wr#VPW#R4#)zsShow my ACLs for a mailbox (i.e. the rights that I have on mailbox).

(typ, [data]) = <instance>.myrights(mailbox)
rrr4s&&  r@�myrights�IMAP4.myrights�s+��
�&�&�z�7�;����&�&�s��<�<r?c�P�RpVPV4wr#VPW#V4#)zQReturns IMAP namespaces ala rfc2342

(typ, [data, ...]) = <instance>.namespace()
r"rr�s&   r@�	namespace�IMAP4.namespaces.��
���'�'��-����&�&�s��6�6r?c�~�VP^8�dVPVP4VPR4#)z6Send NOOP command.

(typ, [data]) = <instance>.noop()
r#)rN�_dump_urrRr�rrs&r@r��
IMAP4.noop
s5��
��z�z�Q���
�
�d�5�5�6��#�#�F�+�+r?c�T�RpVPWQW#V4wrgVPWgR4#)z�Fetch truncated part of a message.

(typ, [data, ...]) = <instance>.partial(message_num, message_part, start, length)

'data' is tuple of message part envelope and data.
r$rr)ra�message_num�message_part�startr�r�r�r�s&&&&&   r@�partial�
IMAP4.partials3�����'�'��<�PV�W����&�&�s��9�9r?c�*�RpVPRV4#)z�Assume authentication as "user".

Allows an authorised administrator to proxy into any user's
mailbox.

(typ, [data]) = <instance>.proxyauth(user)
r%r)rarVr�s&& r@�	proxyauth�IMAP4.proxyauth$s�����#�#�K��6�6r?c�&�VPRW4#)z[Rename old mailbox name to new.

(typ, [data]) = <instance>.rename(oldmailbox, newmailbox)
r&r)ra�
oldmailbox�
newmailboxs&&&r@�rename�IMAP4.rename1s��
�#�#�H�j�E�Er?c���RpV'dAVP'd\PR4hVP!VRV.VO5!wrEMVP!V.VO5!wrEVP	WEV4#)z�Search mailbox for matching messages.

(typ, [data]) = <instance>.search(charset, criterion, ...)

'data' is space separated list of matching message numbers.
If UTF8 is enabled, charset MUST be None.
r'z'Non-None charset not valid in UTF8 mode�CHARSET)rirrAr�r�)ra�charset�criteriar�r�r�s&&*   r@�search�IMAP4.search9so������ � � ��k�k�"K�L�L��+�+�D�)�W�P�x�P�H�C���+�+�D�<�8�<�H�C��&�&�s��6�6r?c��/VnW nV'dRpMRpVPW14wrEVR8wdRVnWE3#RVnRVP9dNV'gFVP^8�dVPVP4VP
RV,4hW@PPRR	.43#)
aDSelect a mailbox.

Flush all untagged responses.

(typ, [data]) = <instance>.select(mailbox='INBOX', readonly=False)

'data' is count of messages in mailbox ('EXISTS' response).

Mandated responses are ('FLAGS', 'EXISTS', 'RECENT', 'UIDVALIDITY'), so
other responses should be obtained via <instance>.response('FLAGS') etc.
rr(rzr
�SELECTED�	READ-ONLYz%s is not writable�EXISTSN)rRrVr�rOrNrvrG�get)rar�rGr�r�r�s&&&   r@�select�IMAP4.selectKs���#%���#����D��D��'�'��6����$�;��D�J��8�O���
��$�1�1�1� ���:�:��?��M�M�$�"9�"9�:��-�-� 4�w� >�?�?��+�+�/�/��4�&�A�A�Ar?c�(�VPRWV4#)zJSet a mailbox acl.

(typ, [data]) = <instance>.setacl(mailbox, who, what)
r)r)rar�r%�whats&&&&r@�setacl�IMAP4.setaclks��
�#�#�H�g�D�A�Ar?c�R�VP!R.VO5!wr#VPW#R4#)zW(typ, [data]) = <instance>.setannotation(mailbox[, entry, attribute]+)
Set ANNOTATIONs.r*r8r)rar�r�r�s&*  r@�
setannotation�IMAP4.setannotationss.���'�'��?�$�?����&�&�s��>�>r?c�N�VPRW4wr4VPW4R4#)zYSet the quota root's resource limits.

(typ, [data]) = <instance>.setquota(root, limits)
r+r>r)rar?�limitsr�r�s&&&  r@�setquota�IMAP4.setquota{s+��
�'�'�
�D�A����&�&�s��9�9r?c��RpV^,VR,3R8wd
RV,pVP!WAV.VO5!wrVVPWVV4#)zqIMAP4rev1 extension SORT command.

(typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...)
r,r�r�r�r)ra�
sort_criteriar��search_criteriar�r�r�s&&&*   r@�sort�
IMAP4.sort�sX��
��
�!��]�2�.�/�9�<�"�]�2�M��'�'��W�W��W����&�&�s��6�6r?c�<�Rp\'gVPR4hVP'dVPR4hW P9dVPR4hVf\
P!4pVPV4wr4VR8XdeVPVPVPR7Vn	VPPR4VnRVnVP4MVPR4hVPW4V4#)	r-zSSL support missingzTLS session already establishedzTLS not supported by serverrz��server_hostnamer�TzCouldn't establish TLS session)�HAVE_SSLrArXrDr��ssl�_create_stdlib_contextr��wrap_socketr�rbr�r�r�r�)ra�ssl_contextr�r�r�s&&   r@�starttls�IMAP4.starttls�s������x��*�*�2�3�3�� � � ��*�*�>�?�?��(�(�(��*�*�:�;�;����4�4�6�K��'�'��-����$�;�#�/�/��	�	�@D�	�	�0�K�D�I����+�+�D�1�D�J�$(�D�!��"�"�$��*�*�=�>�>��&�&�s��6�6r?c�R�RpVPW1V4wrEVPWEV4#)z`Request named status conditions for mailbox.

(typ, [data]) = <instance>.status(mailbox, names)
r.r)rar��namesr�r�r�s&&&   r@�status�IMAP4.status�s2��
���'�'��u�=����&�&�s��6�6r?c��V^,VR,3R8wd
RV,pVPRWV4wrEVPWER4#)zqAlters flag dispositions for messages in mailbox.

(typ, [data]) = <instance>.store(message_set, command, flags)
r�r/rr�r�r)rar�commandr�r�r�s&&&&  r@�store�IMAP4.store�sK��

�!�H�U�2�Y��9�,��U�N�E��'�'���u�M����&�&�s��9�9r?c�&�VPRV4#)zISubscribe to new mailbox.

(typ, [data]) = <instance>.subscribe(mailbox)
r0rrs&&r@�	subscribe�IMAP4.subscribe�s��
�#�#�K��9�9r?c�X�RpVP!WAV.VO5!wrVVPWVV4#)z{IMAPrev1 extension THREAD command.

(type, [data]) = <instance>.thread(threading_algorithm, charset, search_criteria, ...)
r1r)ra�threading_algorithmr�r�r�r�r�s&&&*   r@�thread�IMAP4.thread�s5��
���'�'��7�]�_�]����&�&�s��6�6r?c��VP4pV\9gVPRV,4hVP\V,9dBVPRV:RVP:RRP	\V,4:24hRpVP
!W1.VO5!wrEVR9dTpMRpVP
WEV4#)	z�Execute "command arg ..." with messages identified by UID,
        rather than message number.

(typ, [data]) = <instance>.uid(command, arg1, arg2, ...)

Returns response appropriate to 'command'.
zUnknown IMAP4 UID command: %s�command � illegal in state �, only allowed in states �, r2r)r'r,r1)r�r�rArOr�r�r�)rar�r�r�r�r�s&&*   r@�uid�	IMAP4.uid�s����-�-�/���(�"��*�*�<�w�F�G�G��:�:�X�g�.�.��*�*�%�t�z�z�"�i�i���(9�:�<�=�
=����'�'��=��=����2�2��D��D��&�&�s��6�6r?c�&�VPRV4#)zOUnsubscribe from old mailbox.

(typ, [data]) = <instance>.unsubscribe(mailbox)
r3rrs&&r@�unsubscribe�IMAP4.unsubscribe�s��
�#�#�M�7�;�;r?c�V�VPR4wrRVnW3# RTni;i)aFree server's resources associated with the selected mailbox
and returns the server to the authenticated state.
This command performs the same actions as CLOSE, except
that no messages are permanently removed from the currently
selected mailbox.

(typ, [data]) = <instance>.unselect()
r4r
r)rar�r�s&  r@�unselect�IMAP4.unselect�s3��	 ��,�,�Z�8�I�C��D�J��y��� �D�J�rc��VP4pV\9gVP3\V&VP!V.VO5!#)z�Allow simple extension commands
        notified by server in CAPABILITY response.

Assumes command is legal in current state.

(typ, [data]) = <instance>.xatom(name, arg, ...)

Returns response appropriate to extension command 'name'.
)r�r�rOr��rar�r�s&&*r@�xatom�IMAP4.xatoms>���z�z�|���x��"�j�j�]�H�T�N��#�#�D�0�4�0�0r?c��VfRpVP'd�VP'd6\VPR	,^,R	,\4'dVPP	W.34M;VPR	,pV^,V8XgQhV^,P	V4TP
^8�dTP
RTRT:24R#VPpVP
^8�d8VP
RV:R\VPVR44:RV:R24W9dWA,P	V4R#V.WA&R#)
Nr?zidle: queue untagged r`�untagged_responses[z] rKz += ["z"]r�)
rUrTrb�bytesr�rNr�rRr�r�)rar�r�r��urs&&&  r@�_append_untagged�IMAP4._append_untaggeds���;��C������(�(�(��4�/�/��3�A�6�r�:�E�B�B��$�$�+�+�S�%�L�9� �/�/��3����{�c�)�)�)����"�"�3�'�!�Z�Z�1�_��
�
�2�3�%�q���@�A��
�
$�
$����z�z�Q���
�
��c�"�&�&��R�.�1�3�8�9��9��G�N�N�3���e�B�Gr?c��VPPR4pV'd3VPVR,PVPR44hR#)�BYErNr�)rRr�rDrrj)ra�byes& r@�
_check_bye�IMAP4._check_bye9sB���%�%�)�)�%�0����*�*�S��W�^�^�D�N�N�I�F�G�G�r?c���VP\V,9dIRVnVPRV:RVP:RRP	\V,4:24hRF"pW0P
9gKVP
VK$	RVP
9d$VP'gVPR4hVP4p\WP4pVR,V,pVFDpVfK	\V\4'd\W`P4pVR,V,pKF	VPpVe�RVn\V4\VP4JdTpMxRpVP'd8V\R\!V4,VP4,pVR	,pM-V\R
\!V4,VP4,pVP"^8�dVP%RV,4MVP'RV,4VP)V\*,4TfT#TP14'dTP2T,'gK1T#X'dT!TP44pTP"^8�d"TP%R
\!T4,4TP)T4TP)\*4T'dK�T# \,dp	TP/RT	,4hRp	?	ii;i \,dp	TP/RT	,4hRp	?	ii;i)Nr�r�r�r�r�z#mailbox status changed to READ-ONLY� z UTF8 (~{%s}�)z {%s}z> %rzsocket error: %szwrite literal size %s�rz�NO�BAD)rOr�rPrAr�rRrVrG�_new_tagr�rjrbrc�type�_commandrir�rNr��_logr�r�r_rDr�rQrS)
rar�r�r��tagr��argrP�	literator�vals
&&*       r@r��IMAP4._command?s����:�:�X�d�^�+��D�L��*�*�"�D�J�J�"�i�i����7�9�:�
:�
'�C��-�-�-��+�+�C�0�'��$�1�1�1�� � � ��-�-� E�F�F��m�m�o���T�>�>�*���T�z�D� ���C��{�H��#�s�#�#��C���0���$�;��$�D�	��,�,�����D�L��G�}��T�]�]� 3�3�#�	� �	��$�$�$��%���W��(E�t�~�~�"V�V�D�%��n�G��%��#�g�,�(>����"O�O�D���z�z�Q���
�
�6�D�=�)��	�	�&�4�-�(�	7��I�I�d�T�k�"��?��J���$�$�&�&��'�'��,�,��J��#�D�$>�$>�?����:�:��?��J�J�6��W��E�F�
;��	�	�'�"��	�	�$���9���
��?�	7��*�*�/�#�5�6�6��	7��2�
;��j�j�!3�c�!9�:�:��
;�s0�8L�&L:�L7�L2�2L7�:M"�M�M"c��VR8HpV'gVP4VPW#R7wrET'gTP4TR8XdTPT:RT:RT:24hYE3# TPdpTPRT:RT:24hRp?iTPdpTPRT:RT:24hRp?ii;i)r
)�
expect_byez	command: � => Nr�z command error: r`)r��_get_tagged_responserDrA)rar�r�r�r�r�r�s&&&    r@�_command_complete�IMAP4._command_complete�s����(�"����O�O��	@��1�1�#�1�I�I�C�
��O�O���%�<��*�*�$��T�J�K�K��y����z�z�	@��*�*�D�#�>�?�?���z�z�	@��*�*�D�#�>�?�?��	@�s)�A1�1C
�B�C
�.C
�/C�C
c���VP4wrVR.8XdVPR4h\VR,VP4pVP	4p\VP
44VnR#)Nz"no CAPABILITY response from serverr�)rrArcrjr��tuple�splitr�rs&  r@r��IMAP4._get_capabilities�s[���?�?�$����4�&�=��*�*�A�B�B��#�b�'�4�>�>�*���i�i�k��!�#�)�)�+�.��r?c�V�VRJd�VP'dqVe
V^8�gQhVPP4pVPPV4VP4pTPPT4MVP4pVP
VPV4'd�VPPR4pWPP9gVPRV,4hVPPR4p\W`P4pVPPR4pWg.3VPV&EM�RpVP
\V4'g>VP
VPV4'dVPPR4pVPfWVP
\ V4'd#VPPR4VnR#VPRV,4hVPPR4p\W`P4pVPPR4pVfRpV'dVR	,V,pVP
VP$V4'd�\'VPPR
44p	VP(^8�dVP+RV	,4VP-V	4p
VP/WgV
34VP4pK�VP/Wg4VR
9dwVP
\0V4'd[VPPR4p\W`P4pVP/W`PPR44VP(^8�d VR9dVP+V:RV:24V# \dpTP
ThRp?ii;i TPPT4i;i)FNr�zunexpected tagged response: %rr�r��data2zunexpected response: %rr?r�r�zread literal size %sz response: r�)r�r�r�)r��
gettimeout�
settimeout�	_get_line�TimeoutErrorrJ�_matchr��mo�grouprQrDrcrj�Untagged_responserq�ContinuationrSro�intrNr�r�r��
Response_code)ra�
start_timeout�
saved_timeout�resp�errr�r�r��dat2r�r�s&&         r@r��IMAP4._get_response�s'����%�$�)�)�)� �(�M�A�,=�=�=� �I�I�0�0�2�M��I�I� � ��/�
4��~�~�'���	�	�$�$�]�3��>�>�#�D��;�;�t�z�z�4�(�(��'�'�-�-��&�C��.�.�.��j�j�!A�D�!H�I�I��'�'�-�-��'�C��c�>�>�*�C��'�'�-�-��'�C�),�e��D� � ��%��D��;�;�0�$�7�7��;�;�t�3�3�T�:�:��7�7�=�=��1�D��w�w���;�;�|�T�2�2�15�����v�1F�D�.���j�j�!:�T�!A�B�B��'�'�-�-��'�C��c�>�>�*�C��'�'�-�-��'�C��{�#�C��3��:��,�S��+�+�d�l�l�C�0�0��4�7�7�=�=��0�1����z�z�Q���
�
�#9�D�#@�A��y�y�����%�%�c��;�7��n�n�&���!�!�#�+��%�%�$�+�+�m�S�*I�*I��'�'�-�-��'�C��c�>�>�*�C��!�!�#�w�w�}�}�V�'<�=���z�z�Q��3�*>�#>��
�
��S�9�:����W �
5��+�+��4��
5���	�	�$�$�]�3�s$�O+�+P�6
P�P�P�P(c�h�VPV,pVeVPVV#V'd&RpVPPVR4pVeWE3#VP4VP	4Kw TP
d)pTP^8�dTP4hRp?ii;i)�Nr�)rQrR�popr�r�rDrN�	print_log)rar�r��resultr�r�r�s&&&    r@r��IMAP4._get_tagged_response
s�����)�)�#�.�F��!��(�(��-��
�����-�-�1�1�#�t�<���?��:�%�
�O�O��
��"�"�$���:�:�
���z�z�Q�����(���	
�s�&A8�8B1�	#B,�,B1c�H�VP4pV'gVPR4hVPR4'gVPRV,4hVRRpVP^8�dVP	RV,4V#VPRV,4V#)zsocket error: EOFrz#socket error: unterminated line: %rNz< %r���)r�rD�endswithrNr�r��rar�s& r@r��IMAP4._get_line+s����}�}�����*�*�0�1�1��}�}�W�%�%��*�*�B�T�I�J�J��C�R�y����z�z�Q���
�
�6�D�=�)����	�	�&�4�-�(��r?c��VPV4VnVPeMVP^8�d<VPRVP:RVPP4:24VPRJ#)TNz		matched r�)�matchr�rNr�rP�groups)ra�cre�ss&&&r@r��IMAP4._match>sY��
�)�)�A�,�����w�w�"�t�z�z�Q���
�
�3�;�;������@P�Q�R��w�w�d�"�"r?c���VP\\VP4VP4,pVP^,VnRVP
V&V#�rN)rr�rcrWrjrQ)rar�s& r@r��IMAP4._new_tagJsH���k�k�E�#�d�k�k�"2�D�N�N�C�C���k�k�A�o���$(����S�!��
r?c�j�VPRR4pVPRR4pRV,R,#)�\z\\�"z\")r)rar�s&&r@rU�IMAP4._quoteRs0���k�k�$��'���k�k�#�u�%���S�y�3��r?c�H�VPWP!V.VO5!4#r�)r�r�r�s&&*r@r��IMAP4._simple_commandZs!���%�%�d�M�M�$�,F��,F�G�Gr?c���VR8XdW3#W0P9gVR.3#VPPV4pVP^8�dVPRV:RV:24W3#)r�Nr�z] => )rRrrNr�)rar�r�r�r�s&&&& r@r��IMAP4._untagged_response_se���$�;��8�O��.�.�.����;���&�&�*�*�4�0����z�z�Q���
�
�T�4�H�I��y�r?c�6�Vf\P!4p\P!R\P!V44p\PPRW2^d,^d,V3,4\PP
4R#)Nz%M:%Sz
  %s.%02d %s
)�time�strftime�	localtimer��stderr�write�flush)rar�secs�tms&&& r@r��IMAP4._mesgms`���|��y�y�{�����w����t�(<�=�B��J�J���-��3�h��^�Q�0G�G�H��J�J���r?c��V'gR#RVP44pVPRRPV4,4R#)Nc3�6"�TFwrVRV:2x�K	R#5i)�: Nr8)�.0�key�values&  r@�	<genexpr>�!IMAP4._dump_ur.<locals>.<genexpr>ws%���B�&@�
���u�B�u�i�(�&@�s�zuntagged responses dump:z
		)�itemsr�r�)ra�untagged_resp_dictr2s&& r@rv�IMAP4._dump_urts=��%��B�&8�&>�&>�&@�B�E��J�J�1�H�M�M�%�4H�H�Ir?c���V\P!43VPVP&V;P^,
unVPVP8�d
^VnR#R#r)r!r�r�r�r
s&&r@r��
IMAP4._log{sS��04�d�i�i�k�/B�D�M�M�$�+�+�,�����"��� � �D�$5�$5�5�$%��!�6r?c�8�VPR\VP4,4VPVPr!V'dIVP!VPV,!T^,
pYP8�d^pT^,pKPR# L,;i)zlast %d IMAP4 interactions:N)r�r�r�r�r�)ra�i�ns&  r@r�IMAP4.print_log�s����J�J�4�s�4�=�=�7I�I�J��$�$�d�&7�&7�q����J�J��
�
�a� 0�1��Q����)�)�)��A��Q�������s�!B�B)ror�rqr�r�r�rjr�rUrTrZrXr�rSrNrbrVrPr�rWrcr�rOrQrWrr�rRrVrir�r�)z""�*)r�F)F)]r:r;r<r=�__doc__r]rArDrGr�rJ�
IMAP4_PORTrerYrvr\r�r�r�r�r[�propertyr�r�r�r�r^r�r�r�r�rrrr�rrr"r&r)r,r0r5r;r@rFrKrQrXr\r[r�rmrprsr�r|rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rUr�r�r�rvr�rr>�__classdictcell__��
__classdict__s@r@rr�s�����-�^!�	� �����5��.�<�.��Z���8F�<�'7�TC���1���T�	.��
��
� %�P!�H �
� �7�"C�E�0�:7�-��F�7�7�?�
�7�7�8�?�:�'�
%�	7��B�
5� 
�	7�=�7�,�	:�
7�F�7�$B�@B�?�:�7�7�.	7�:�:�7�7�2<�
� 1�,�@H�N�b�$/�\�~�B�&	#���H�
	��	�	J�	&�	�	r?c�Za�]tRtRtoRtRRltRtRtRtR
Rlt	R	t
RR
ltRtVt
R#)rIi�z�Iterable IDLE context manager: start IDLE & produce untagged responses.

An object of this type is returned by the IMAP4.idle() method.

Note: The name and structure of this class are subject to change.
Nc���RVP9dVPR4hVe$VP'gVPR4hW nRVnWnRVnRVnR#)rz"Server does not support IMAP4 IDLENz%duration requires a socket connection)r�rAr��	_duration�	_deadline�_imap�_tag�_saved_state)ra�imaprJs&&&r@re�Idler.__init__�s^����*�*�*��*�*�A�B�B����	�	�	��*�*�D�E�E�!������
���	� ��r?c�`�VPpVP'dQhVP'dQhTP^8�dTP	RTP
24RTnTP
R4TnTP4;p'd|TPTP,'gK=TPPTP4wr4TR8XdTPRT24hTPRT24hTP^8�d!TPpTP	RT24TP
e,\P !4TP
,TnTP$TnRTnT# \d
RTnhi;i)	Tzidle start duration=rr�z
idle denied: zunexpected status response: zidle continuation prompt: F�IDLING)rFrTrUrNr�rDr�rGr�rQrrArDrS�
BaseExceptionr!�	monotonicrErOrH)rarIrr�r��prompts&     r@r��Idler.__enter__�sn���z�z���'�'�'�'�'��%�%�%�%�%����q���J�J�-�d�n�n�-=�>�?�
"���	��
�
�f�-�D�I��,�,�.�.�$�.��'�'��	�	�2�2� $� 4� 4� 8� 8���� C�I�C��d�{�"�j�j�=���)?�@�@��*�*�'C�D�6�%J�K�K�!�Z�Z�1�_��3�3���
�
�7��x�@�A�
�>�>�%�!�^�^�-����>�D�N� �J�J�����
�����	�!&�D���	�s�,-F� F�?BF�F-c��VPpVP^8�dVPR4VPVnRVn\
VP4;p'drTP^8�dTPRTR24TP'd:TPP^4wrgTFpTPYh4K	KKVPR\,4VPRVP4wp	wp
VP^8�dVPRV	RV
:24R# \dT'ghR#i;i)	Tz	idle doneFzidle quit with z leftover responsessDONErz
idle status: r`)rFrNr�rHrOrUr�rTrr�r�r�r�rGr_)ra�exc_type�exc_val�exc_tbrI�	leftoversr�r��datumr��msgs&&&&       r@r��Idler.__exit__�s)���z�z�����q���J�J�{�#��&�&��
�#����D�0�0�1�1�9�1�!�Z�Z�1�_��
�
�_�Y�K�7J�K�L��&�&�&� �0�0�4�4�Q�7�	��!�E��)�)�#�5�"�	��I�I�g��n�%� �2�2�6�4�9�9�E�M�F�E�S�!�Z�Z�1�_��
�
�]�6�(�!�C�7�;�<�
��	�	�����		�s�A&D>�>E�E�Ec��V#r�r8rrs&r@�__iter__�Idler.__iter__�r�r?c���VPpVPR8wdVPR4hVP'dMVPP	^4pVP
^8�dVP
RVRV^,24V#TP
^8�dTP
RTR24TeT^8:dT#\T4pTPT4TPP	^4pTP
^8�dTP
RTRT^,24T# \Pd,TP
^8�dTP
RTR24Tu#i;i)rLz_pop() only works during IDLEz
idle _pop(z) de-queued z	) readingz) donez) read )rFrOrArTrrNr��floatr�rrJ)rard�defaultrIrs&&&  r@�_pop�
Idler._pop�sG��$�z�z���:�:��!��*�*�<�=�=������'�'�+�+�A�.�D�!�Z�Z�1�_��
�
�Z��y��T�!�W�I�F�G��K����q���J�J��G�9�I�6�7����!�|����G�n�G�	����w�'��#�#�'�'��*�����q���J�J��G�9�G�D��G�9�=�>�����%�%�	�!�Z�Z�1�_��
�
�Z��y��7�8��N�	�s�D)�)=E)�(E)c��VPpVPfRpM&VP\P!4,
pVPV4wr4V'g)TP^8�dTPR4\hW43#)Nzidle iterator exhausted)	rFrDrEr!rNr_rNr��
StopIteration)rarIrdr�r�s&    r@�__next__�Idler.__next__*sh���z�z���>�>�!��G��n�n�t�~�~�'7�7�G��I�I�g�&�	���!�Z�Z�1�_��
�
�4�5����y�r?c#�"�VPP'gVPPR4h\V4x�TPTR4;p'dTx�K R# \dR#i;i5i)aEYield a burst of responses no more than 'interval' seconds apart.

with M.idle() as idler:
    # get a response and any others following by < 0.1 seconds
    batch = list(idler.burst())
    print(f'processing {len(batch)} responses...')
    print(batch)

Note: This generator requires a socket connection (not IMAP4_stream).
z$burst() requires a socket connectionN)rFr�rA�nextrbr_)ra�intervalr�s&& r@�burst�Idler.burst:sn����z�z�����*�*�"�"�#I�J�J�	��t�*���)�)�H�d�3�3�h�3��N�4���	��	�s.�8A<�
A*�A<�"A<�*A9�5A<�8A9�9A<)rErDrFrHrGr�))rKN)g�������?)r:r;r<r=r<rer�r�rZr_rcrhr>r?r@s@r@rIrI�s5�����
!�)�V$�L�0�d� �r?rIc�Ta�]tRtRtoRtR]3RRRR/RlltRtR]R3R	ltR
t	Vt
R#)�	IMAP4_SSLiSa?IMAP4 client class over SSL connection

Instantiate with: IMAP4_SSL([host[, port[, ssl_context[, timeout=None]]]])

        host - host's name (default: localhost);
        port - port number (default: standard IMAP4 SSL port);
        ssl_context - a SSLContext object that contains your certificate chain
                      and private key (default: None)
        timeout - socket timeout (default: None) If timeout is not given or is None,
                  the global default socket timeout is used

for more documentation see the docstring of the parent class IMAP4.
rKr�Nrdc�p�Vf\P!4pW0n\P	WW$4R#r�)r�r�r�rre)rarbrcr�rds&&&$$r@re�IMAP4_SSL.__init__ds*���"�!�8�8�:��*���N�N�4�t�5r?c�z�\PW4pVPPVVPR7#)r�)rr�r�r�rb)rardr�s&& r@r��IMAP4_SSL._create_socketks;���'�'��6�D��#�#�/�/��@D�	�	�0�K�
Kr?c�2�\PWW#4R#)z�Setup connection to remote server on "host:port".
    (default: localhost:standard IMAP4 SSL port).
This connection will be used by the routines:
    read, readline, send, shutdown.
N)rr[r`s&&&&r@r[�IMAP4_SSL.openps��
�J�J�t�4�1r?)r�)r:r;r<r=r<�IMAP4_SSL_PORTrer�r[r>r?r@s@r@rkrkSs?����	�!#��	6�$(�	6�26�	6�	K�
�^�T�	2�	2r?rkc�La�]tRtRtoRtRtRRltRtRtRt	R	t
R
tVtR#)ri{z�IMAP4 client class over a stream

Instantiate with: IMAP4_stream(command)

        "command" - a string that can be passed to subprocess.Popen()

for more documentation see the docstring of the parent class IMAP4.
c�<�Wn\PV4R#r�)r�rre)rar�s&&r@re�IMAP4_stream.__init__�s����
���t�r?Nc	�@�RVnRVnRVnRVn\P
!VP\\P\PRRR7Vn	VPPVnVPPVn
R#)zmSetup a stream connection.
This connection will be used by the routines:
    read, readline, send, shutdown.
NT)�bufsize�stdin�stdout�shell�	close_fds)rbrcr�r��
subprocess�Popenr�r�PIPErrx�	writefilery�readfiler`s&&&&r@r[�IMAP4_stream.open�sq��
��	���	���	���
�!�'�'����'��/�/�*�/�/��$�(������+�+������+�+��
r?c�8�VPPV4#)r�)r�r�)rar�s&&r@r��IMAP4_stream.read�s���}�}�!�!�$�'�'r?c�6�VPP4#)r�)r�r�rrs&r@r��IMAP4_stream.readline�s���}�}�%�%�'�'r?c�p�VPPV4VPP4R#)r�N)rr%r&r�s&&r@r��IMAP4_stream.send�s$�������T�"������r?c��VPP4VPP4VPP	4R#)r�N)r�r�rr�waitrrs&r@r^�IMAP4_stream.shutdown�s2���
�
���������������r?)r�r�rbrcrr�r�r)NNN)
r:r;r<r=r<rer[r�r�r�r^r>r?r@s@r@rr{s-������
,� (�
(�
��r?c�<a�]tRtRtoRtRtRtRtRtRt	Vt
R#)	ri�zSPrivate class to provide en/decoding
for base64-based authentication conversation.
c��WnR#r��r)ra�mechinsts&&r@re�_Authenticator.__init__�s���	r?c�p�VPVPV44pVfR#VPV4#)N�*)rrrd)rar��rets&& r@r�_Authenticator.process�s0���i�i����D�)�*���;���{�{�3��r?c��Rp\V\4'dVPR4pV'dU\V4^08�dVR,pVR,pMTpRp\P
!V4pV'gKOW$RR,pK\V#)r?ru:N�0N:r�NNNr�)rbrcrdr��binascii�
b2a_base64)ra�inp�oup�t�es&&   r@rd�_Authenticator.encode�su�����c�3����*�*�W�%�C���3�x�"�}���H���#�h�������#�#�A�&�A��q��c�r�F�l���
r?c�B�V'gR#\P!V4#)r?)r��
a2b_base64)rar�s&&r@r�_Authenticator.decode�s�����"�"�3�'�'r?r�N)r:r;r<r=r<rerrdrr>r?r@s@r@rr�s#������ ��0(�(r?rz0 Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Decr`:rNNc	��\PV4pV'gR#\VPR4,pVPR4p\	VPR44p\	VPR44p\	VPR44p\	VPR44p\	VPR44p\	VPR	44p	\	VPR
44p
V	^<,V
,^<,pVR8XdV)pWRWFWxRRR3	p\
P!V4V,
p
\P!V
4#)
z�Parse an IMAP4 INTERNALDATE string.

Return corresponding local time.  The return value is a
time.struct_time tuple or None if the string has wrong format.
N�mon�zonen�day�year�hour�min�sec�zoneh�zonem�-r�)	�InternalDater�Mon2numr�r��calendar�timegmr!r#)rr�r�r�r�r�r�r�r�r�r��zone�tt�utcs&             r@�Internaldate2tupler��s��
�	�	�D�	!�B�
��
�"�(�(�5�/�
"�C��H�H�W��E�

�b�h�h�u�o�
�C��r�x�x��� �D��r�x�x��� �D�

�b�h�h�u�o�
�C�

�b�h�h�u�o�
�C������!�"�E������!�"�E�
�"�H�u��b� �D���}��u��
�S��"�b�"�	5�B�
�/�/�"�
��
$�C��>�>�#��r?c��RpRp\\V44pV'd#\V^4wrW#V^,V,pK*V#)z-Convert integer to A-P string representation.r?sABCDEFGHIJKLMNOP)r��abs�divmod)�numr��AP�mods&   r@r|r|sB���C�'�r�

�c�#�h�-�C�

��#�r�?����S��U�m�c�!���Jr?c��\PV4pV'gR#\VPR4P	44#)z-Convert IMAP4 flags response to python tuple.r�r8)�Flagsrr�r�r�)rr�s& r@�
ParseFlagsr�s7��
���T�	�B�
��	�����'�"�(�(�*�+�+r?c���\V\\34'd5\P!V\
P4P4pM�\V\4'd6VPp\!VR7p\VR,R\V4/pMl\V\4'dVP"f\%R4hTpM:\V\&4'dV^,VR,3R8XdV#\%R4hRP)\*VP,,4pVP/V4# \d�\P'dmT^,pTR8Xd2\P!\P!T44^,p\P
\P3T,)pELX\P
)pELli;i)	a�Convert date_time to IMAP4 INTERNALDATE representation.

Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"'.  The
date_time argument can be a number (int or float) representing
seconds since epoch (as returned by time.time()), a 9-tuple
representing local time, an instance of time.struct_time (as
returned by time.localtime()), an aware datetime instance or a
double-quoted string.  In the last case, it is assumed to already
be in the correct format.
)�seconds:N�N�tzinfozdate_time must be awarezdate_time not of a known typez"%d-{}-%Y %H:%M:%S %z"r�)rr)rbr�r]r�
fromtimestamprr��
astimezoner��	tm_gmtoffr�r!�daylightr#�mktime�altzonerr�r�rc�format�Months�monthr")r��dt�gmtoff�dst�delta�fmts&     r@r�r�sh���)�c�5�\�*�*�
�
#�
#�I�$,�L�L�2�2<�*�,�	�	�I�u�	%�	%�		(��(�(�F��&�)��
�y��}�
=�X�e�_�
=��	�I�x�	(�	(����#��6�7�7�
��	�I�s�	#�	#��1��i��m�(D�	�(Q����8�9�9�
"�
)�
)�&����*:�
;�C�
�;�;�s����'�	(��}�}�}���l���"�9��.�.����Y�)?�@��C�C��=�=�$�,�,�7��<�<���-�-���	(�s�(D?�? G!� A)G!�G!� G!�__main__zd:s:z-dz-szIMAP password for z on �	localhostr,zJFrom: %(user)s@localhost%(lf)sSubject: IMAP4 test%(lf)s%(lf)sdata...%(lf)srV�lf�
rX�
/tmp/yyz 2r�rQr�c���\PV:RV:24\\V4!V!wr#\PV:RV:RV:24VR8Xd
V^,hV#)r`r�r�)�Mr�r�)�cmdr�r�r�s&&  r@�runr�sL��	���3��%�&��1�c�?�D�)���	����c�3�/�0��$�;�c�!�f���
r?zPROTOCOL_VERSION = %szCAPABILITIES = z.*"([^"]+)"$r"z%sz:(FLAGS INTERNALDATE RFC822.SIZE RFC822.HEADER RFC822.TEXT)z
All tests OK.z
Tests failed.z8
If you would like to see debugging output,
try: %s -d5
)rrr�r|r�r�)�	IMAP4REV1r)r
r�)r{)r{r
r�r
)r�)r
r8)rK)r)�
/tmp/xxx 1)r�)r�z/tmp/yyy)r�r�)rQ)z/tmpzyy*)r�r�)r�)N�SUBJECT�test)r0)�1z(FLAGS INTERNALDATE RFC822))r�)r��FLAGSz
(\Deleted))rsr8)r,r8)r�r8)r�r8)r�r8)r�)�UIDVALIDITY)r�)r'�ALL)r�)r�)r�r8)z/tmp/zyy%r�)Wr<r�r�r�r}rkr�r|r�r!r�rrr�iorr�r��ImportError�__all__r�rMr=rrr�r�r�rlr�r�r�rnror�r�r�rqrmrprrIrkr�rrr�r��	enumeraterdr�r�r|r�r�r:�getopt�getpass�argv�optlistr�rAr��stream_command�optr�rb�getuser�USER�PASSWD�	test_mesg�	test_seq1�	test_seq2r�r�rOr�r�r�r��mlrr�r��pathr�r��print)r9rs00r@�<module>r�sy��
�.��K�K�K�K�K�2�2�"����H�8��
��	��
�
���(����
-
��,�-
�	��-
�	�A�	-
�
	�
�-
�	�
�
-
�	�
�-
�	�,�-
�	�,�-
�	�,�-
�	�
�-
�	�,�-
�	�
�-
�	�
�-
�	�,�-
� 	�,�!-
�"	�,�#-
�$	�,�%-
�&	�,�'-
�(	�,�)-
�*	�,�+-
�,	��--
�.	�A�/-
�0	�,�1-
�2	�
�3-
�4	�,�5-
�6	�A�7-
�8	�
�9-
�:	�	�;-
�<	�,�=-
�>	�
�?-
�@	�,�A-
�B	�,�C-
�D	�,�E-
�F	�,�G-
�H	�
����,��
��,��
�
�
��,��
�Y-
��b�z�z�0�1��
�
�
�4�5���z�z����
�*�*�+�R�X�X�
6��
�*�*�^�
$���
�
�D�E�
��J�J�G�H���*�*�;�R�X�X�G��"��J��D�D�N(~�~�B�#2�E�#2�J�N�N�;��5�5�5�r*(�*(�X
<�	A�	A�#�	F��&/��r�
�&;�
<�&;�d�a�1�8�8�:�a��c�>�&;�
<���F	�,�%�R�z�����
�
�c�h�h�r�l�F�;�
����N����C��$�;���H�E�
�D�[� �N��4�� 1��������7�D��?�?��D�
�_�_�t�T�EX�EX�[�EX�Y�
Z�F�\�`f�gk�mq�rv�_w�w�I��t�V�n���*��
��d�D�)�4�5���)�3�,������I�$�!���
��d�D�)�,�-����I��)���^�,�A��d��A��7�7�f��!�"�
�I�	���'�!�*<�*<�<�=�	���q�~�~�7�8�!�H�C����T�N�"��f�.�/�B����/�2�.�B��"�(�(�1�+�4�����B��$���4�'�"�	0�"�H�C���c�4�.�C��D�z�7�7���b�'�-�-�/�C��������B���P�R�
S�"�	�� �{��M9���H���@6=��`�<�<���B�
������j	�
�� ����
�h�h�q�k��
�
	�sB�Q�(#Q+�,'Q1�
R�ER�	Q(�'Q(�1R�R
�
R�3S

Youez - 2016 - github.com/yon3zu
LinuXploit