AlkantarClanX12

Your IP : 18.227.48.131


Current Path : /opt/alt/python311/lib64/python3.11/email/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/email/__pycache__/generator.cpython-311.opt-2.pyc

�

c��fNQ��~�	gd�ZddlZddlZddlZddlZddlmZddlmZm	Z	ddl
mZddlm
Z
dZdZejd	��Zejd
ej��Zejd��ZGd�d
��ZGd�de��ZdZGd�de��Zeeejdz
����ZdezZejZdS))�	Generator�DecodedGenerator�BytesGenerator�N)�deepcopy)�StringIO�BytesIO)�_has_surrogates)�HeaderWriteError�_�
z
\r\n|\r|\nz^From z\r\n[^ \t]|\r[^ \n\t]|\n[^ \t]c��eZdZ	ddd�d�Zd�Zdd�Zd�Zd�Zd	�Zd
�Z	d�Z
d�Zd
�Zd�Z
e
Zd�Zd�Zd�Zd�Zedd���Zed���ZdS)rN��policyc�Z�	|�|�dn|j}||_||_||_||_dS)NT)�mangle_from_�_fp�
_mangle_from_�maxheaderlenr)�self�outfprrrs     �6/opt/alt/python311/lib64/python3.11/email/generator.py�__init__zGenerator.__init__%sA��	�.��#)�>�4�4�v�7J�L����)���(��������c�:�|j�|��dS�N)r�write�r�ss  rrzGenerator.writeEs������q�����rFc��	|j�|jn|j}|�|�|���}|j�|�|j���}|j|_|�|j��|_d|_|�|j��|_|j}|j}	||_||_|r[|�	��}|s(dtjtj
����z}|�||jz��|�
|��||_||_dS#||_||_wxYw)N)�linesep��max_line_length�zFrom nobody )r�clonerr �_NL�_encode�_encoded_NL�_EMPTY�_encoded_EMPTY�get_unixfrom�time�ctimer�_write)r�msg�unixfromr r�old_gen_policy�old_msg_policy�ufroms        r�flattenzGenerator.flattenIsJ��	�( $�{�2����������\�\�'�\�2�2�F���(��\�\�$�2C�\�D�D�F��>����<�<���1�1������"�l�l�4�;�7�7���
������	(� �D�K��C�J��
-��(�(�*�*���E�*�T�Z��	���-D�-D�D�E��
�
�5�4�8�+�,�,�,��K�K�����(�D�K�'�C�J�J�J��)�D�K�'�C�J�'�'�'�'s
�1BE�Ec�J�	|�||jd|j���S�Nr)�	__class__rr)r�fps  rr$zGenerator.clonezs0��?��~�~�b�"�0�"�%)�[��2�2�	2rc��t��Sr)r�rs r�_new_bufferzGenerator._new_buffer�s���z�z�rc��|Sr�rs  rr&zGenerator._encode�s���rc��|sdSt�|��}|dd�D]1}|�|��|�|j���2|dr|�|d��dSdS)N���)�NLCRE�splitrr%)r�lines�lines   r�_write_lineszGenerator._write_lines�s����	��F����E�"�"���#�2�#�J�	!�	!�D��J�J�t�����J�J�t�x� � � � ���9�	"��J�J�u�R�y�!�!�!�!�!�	"�	"rc�d�|j}	d|_|���x|_}|�|��||_|j}|`n#||_|j}|`wxYw|rht	|��}|�d���|d|d<n|�d|d��|�d|d��t|dd��}|�|�|��n||��|j�	|�
����dS)N�content-transfer-encodingr�Content-Transfer-Encoding�content-type��_write_headers)r�
_munge_cter:�	_dispatchr�get�replace_header�getattrrIr�getvalue)rr.�oldfp�sfp�	munge_cte�meths      rr-zGenerator._write�sD�����	 �"�D�O�!�-�-�/�/�/�D�H�s��N�N�3�����D�H���I������D�H���I��������	=��3�-�-�C��w�w�2�3�3�;�3<�Q�<��/�0�0��"�"�#>�	�!��M�M�M����~�y��|�<�<�<��s�,�d�3�3���<�����$�$�$�$��D��J�J�J�����s�|�|�~�~�&�&�&�&�&s�7A�A#c�^�|���}|���}t�||f���dd��}t|d|zd��}|�3|�dd��}t|d|zd��}|�|j}||��dS)N�-r�_handle_)�get_content_maintype�get_content_subtype�
UNDERSCORE�join�replacerN�
_writeBody)rr.�main�sub�specificrS�generics       rrKzGenerator._dispatch�s���
�'�'�)�)���%�%�'�'���?�?�D�#�;�/�/�7�7��S�A�A���t�Z�(�2�D�9�9���<��l�l�3��,�,�G��4��g�!5�t�<�<�D��|������S�	�	�	�	�	rc���|���D]�\}}|j�||��}|jjr|jj}|�|jj��st
d|�d|�����t�|�	|����rt
d|�����|�
|����|�
|j��dS)Nz folded header does not end with z: z folded header contains newline: )�	raw_itemsr�fold�verify_generated_headersr �endswithr
�NEWLINE_WITHOUT_FWSP�search�removesuffixrr%)rr.�h�v�foldedr s      rrIzGenerator._write_headers�s���M�M�O�O�
	�
	�D�A�q��[�%�%�a��+�+�F��{�3�
G��+�-�����t�{�':�;�;�T�*�R�7�R�R��R�R�T�T�T�'�.�.�v�/B�/B�7�/K�/K�L�L�G�*�E�6�E�E�G�G�G��J�J�v������
�
�4�8�����rc��|���}|�dSt|t��stdt	|��z���t|j��rm|�d��}|�Vt|��}|d=|�	|j|��|���}|d|df|_
|jrt�
d|��}|�|��dS)Nzstring payload expected: %s�charsetrErG�>From )�get_payload�
isinstance�str�	TypeError�typer	�_payload�	get_paramr�set_payloadrJr�fcrer^rC)rr.�payloadrms    r�_handle_textzGenerator._handle_text�s����/�/�#�#���?��F��'�3�'�'�	K��9�D��M�M�I�J�J�J��3�<�(�(�
	8��m�m�I�.�.�G��"��s�m�m���3�4������g�6�6�6��/�/�+�+��#&�'B�#C�#&�~�#6�#8�����	2��h�h�x��1�1�G����'�"�"�"�"�"rc�B�g}|���}|�g}nDt|t��r|�|��dSt|t��s|g}|D]o}|���}|�|��}|�|d|j���|�	|�
�����p|���}|sD|j�
|��}|�|��}|�|��|j�^|jr!t$�d|j��}	n|j}	|�|	��|�|j��|�d|z|jz��|r-|j�|�d����|D]D}
|�|jdz|z|jz��|j�|
���E|�|jdz|zdz|jz��|j�F|jr!t$�d|j��}n|j}|�|��dSdS)NF�r/r rnz--r)rorprqr�listr:r$r3r%�appendrO�get_boundaryr'rZ�_make_boundary�set_boundary�preamblerrwr^rCr�pop�epilogue)rr.�msgtexts�subparts�partr�g�boundary�alltextr��	body_partr�s            r�_handle_multipartzGenerator._handle_multiparts������?�?�$�$�����H�H�
��#�
&�
&�	"��J�J�x� � � ��F��H�d�+�+�	"� �z�H��	*�	*�D�� � �"�"�A��
�
�1�
�
�A�
�I�I�d�U�D�H�I�=�=�=��O�O�A�J�J�L�L�)�)�)�)��#�#�%�%���	'��&�+�+�H�5�5�G��*�*�7�3�3�H����X�&�&�&��<�#��!�
(��8�8�H�c�l�;�;����<�����h�'�'�'��J�J�t�x� � � ��
�
�4�(�?�T�X�-�.�.�.��	,��H�N�N�8�<�<��?�?�+�+�+�"�	&�	&�I��J�J�t�x�$���1�D�H�<�=�=�=��H�N�N�9�%�%�%�%��
�
�4�8�d�?�X�-��4�t�x�?�@�@�@��<�#��!�
(��8�8�H�c�l�;�;����<�����h�'�'�'�'�'�$�#rc��|j}|�d���|_	|�|��||_dS#||_wxYw)Nrr!)rr$r�)rr.�ps   r�_handle_multipart_signedz"Generator._handle_multipart_signedFsS��
�K���g�g�a�g�0�0���	��"�"�3�'�'�'��D�K�K�K��!�D�K�O�O�O�Os�A�	Ac�@�g}|���D]�}|���}|�|��}|�|d|j���|���}|�|j��}|rG|d|jkr6|�	|j�
|dd�������|�	|����|j�|j�
|����dS)NFr{r>)
ror:r$r3r%rOr@r'r)r}rZrr)rr.�blocksr�rr��textrAs        r�_handle_message_delivery_statusz)Generator._handle_message_delivery_statusQs�����O�O�%�%�
	$�
	$�D�� � �"�"�A��
�
�1�
�
�A�
�I�I�d�U�D�H�I�=�=�=��:�:�<�<�D��J�J�t�/�0�0�E��
$��r��d�&9�9�9��
�
�d�.�3�3�E�#�2�#�J�?�?�@�@�@�@��
�
�d�#�#�#�#�	
����t�'�,�,�V�4�4�5�5�5�5�5rc�x�|���}|�|��}|j}t|t��rE|�|�d��d|j���|���}n|�	|��}|j
�|��dS)NrFr{)r:r$rtrpr|r3ror%rOr&rr)rr.rr�rxs     r�_handle_messagezGenerator._handle_messagefs����������J�J�q�M�M���,���g�t�$�$�	,�
�I�I�c�o�o�a�(�(�5�$�(�I�K�K�K��j�j�l�l�G�G��l�l�7�+�+�G�����w�����rc�F�tjtj��}dt|zzdz}|�|S|}d}	|�dt
j|��zdztj��}|�	|��sn|dzt|��z}|dz
}�i|S)	Nz===============z==rTz^--z(--)?$�.rH)�random�	randrange�sys�maxsize�_fmt�_compile_re�re�escape�	MULTILINErgrq)�clsr��tokenr��b�counter�cres       rrzGenerator._make_boundarys���� ���-�-������.��5���<��O�����	��/�/�%�"�)�A�,�,�"6��"A�2�<�P�P�C��:�:�d�#�#�
���3���W���-�A��q�L�G�	��rc�,�tj||��Sr)r��compile�r�r�flagss   rr�zGenerator._compile_re�s���z�!�U�#�#�#r)NN)FNr)�__name__�
__module__�__qualname__rrr3r$r:r&rCr-rKrIryr\r�r�r�r��classmethodrr�r<rrrrsW��������������@���/(�/(�/(�/(�b2�2�2�(������	"�	"�	"� %'�%'�%'�N���(
�
�
�&#�#�#�,�J�8(�8(�8(�t	�	�	�6�6�6�* � � �2�����[��"�$�$��[�$�$�$rrc�R��eZdZ	d�Zd�Zd�Zd�Z�fd�ZeZe	d���Z
�xZS)rc�b�|j�|�dd����dS)N�ascii�surrogateescape)rr�encoders  rrzBytesGenerator.write�s+������q�x�x��):�;�;�<�<�<�<�<rc��t��Sr)rr9s rr:zBytesGenerator._new_buffer�s���y�y�rc�,�|�d��S�Nr�)r�rs  rr&zBytesGenerator._encode�s���x�x�� � � rc���|���D]8\}}|j�|j�||�����9|�|j��dSr)rbrrr�fold_binaryr%)rr.rirjs    rrIzBytesGenerator._write_headers�sb���M�M�O�O�	:�	:�D�A�q��H�N�N�4�;�2�2�1�a�8�8�9�9�9�9��
�
�4�8�����rc�B��|j�dSt|j��rX|jjdksH|jr%t
�d|j��|_|�|j��dStt|���
|��dS)N�7bitrn)rtr	r�cte_typerrwr^rC�superrry)rr.r6s  �rryzBytesGenerator._handle_text�s�����<���F��3�<�(�(�	9���1E�v�1M�1M��!�
@�#�x�x��#�,�?�?������c�l�+�+�+�+�+��.��&�&�3�3�C�8�8�8�8�8rc�R�tj|�d��|��Sr�)r�r�r�r�s   rr�zBytesGenerator._compile_re�s ���z�!�(�(�7�+�+�U�3�3�3r)r�r�r�rr:r&rIryr\r�r��
__classcell__)r6s@rrr�s��������
�=�=�=����!�!�!����
9�
9�
9�
9�
9��J��4�4��[�4�4�4�4�4rrzD[Non-text (%(type)s) part of message omitted, filename %(filename)s]c�$�eZdZ	ddd�d�Zd�ZdS)rNrc�t�	t�|||||���|�t|_dS||_dSr5)rr�_FMTr�)rrrr�fmtrs      rrzDecodedGenerator.__init__�sL��	�*	���4���l�"(�	�	*�	*�	*��;��D�I�I�I��D�I�I�Irc
���|���D]�}|���}|dkr&t|�d���|����B|dkr�It|j|���|���|���|�d��|�dd��|�d	d
��d�z|�����dS)Nr�F)�decode)�file�	multipartz
[no filename]zContent-Descriptionz[no description]rFz
[no encoding])rs�maintype�subtype�filename�description�encoding)	�walkrW�printror��get_content_typerX�get_filenamerL)rr.r�r�s    rrKzDecodedGenerator._dispatch�s���H�H�J�J�	"�	"�D��0�0�2�2�H��6�!�!��d�&�&�e�&�4�4�4�@�@�@�@�@��[�(�(���d�i�#'�#8�#8�#:�#:�#'�#<�#<�#>�#>�#'�#;�#;�#=�#=�#'�#4�#4�_�#E�#E�#'�8�8�,A�,>�$@�$@�#'�8�8�,G�,;�$=�$=�	#�	#�	�!�	"�	"�	"�	"�	"�	"�	"r)NNN)r�r�r�rrKr<rrrr�sI�������
�������<"�"�"�"�"rrrHz%%0%dd)�__all__r�r�r+r��copyr�iorr�email.utilsr	�email.errorsr
rY�NLr�r?r�rwrfrrr�r�len�reprr��_widthr�rr<rr�<module>r�s���
A�
=�
=�
=��	�	�	�	�
�
�
�
�����
�
�
�
������� � � � � � � � �'�'�'�'�'�'�)�)�)�)�)�)�
�
�	����
�=�!�!���r�z�)�R�\�*�*��!�r�z�"C�D�D��x$�x$�x$�x$�x$�x$�x$�x$�v/4�/4�/4�/4�/4�Y�/4�/4�/4�dN��6"�6"�6"�6"�6"�y�6"�6"�6"�t

��T�T�#�+�a�-�
 �
 �	!�	!���&����)���r