Hacked By AnonymousFox

Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/quopri.cpython-312.opt-1.pyc

�

�Q�f���dZgd�ZdZdZdZdZ	ddlmZmZd	�Z
d
�Zdd�Zdd�Z
dd
�Zdd�Zd�Zd�Zd�Zedk(re�yy#e	$rdZdZY�8wxYw)zHConversions to/from quoted-printable transport encoding as per RFC 1521.)�encode�decode�encodestring�decodestring�=�Ls0123456789ABCDEF��)�a2b_qp�b2a_qpNc�T�|dvr|S|dk(r|S|tk(xsd|cxkxrdkncS)z�Decide whether a particular byte ordinal needs to be quoted.

    The 'quotetabs' flag indicates whether embedded tabs and spaces should be
    quoted.  Note that line-ending tabs and spaces are always encoded, as per
    RFC 1521.
    � 	�_� �~)�ESCAPE)�c�	quotetabs�headers   �-/opt/alt/python312/lib64/python3.12/quopri.py�needsquotingrs9��	�F�{����D�y��
���;�1�t�q�0�D�0�1�1rc�h�t|�}ttt|dzt|dzf�zS)zQuote a single character.�)�ordr�bytes�HEX�rs r�quoter$s2��	�A��A��E�3�q�"�u�:�s�1�R�4�y�1�2�2�2rc��t�0|j�}t|||��}|j|�y|dfd�}d}|j�x}r�g}	d}
|dddk(r|dd}d}
|D]P}t	|f�}t|||�rt
|�}|r|dk(r|	jd��@|	j|��R|�||�tj|	�}t|�tkDr3||dtd	z
d
��|td	z
d}t|�tkDr�3|}|j�x}r��|�||
��yy)avRead 'input', apply quoted-printable encoding, and write to 'output'.

    'input' and 'output' are binary file objects. The 'quotetabs' flag
    indicates whether embedded tabs and spaces should be quoted. Note that
    line-ending tabs and spaces are always encoded, as per RFC 1521.
    The 'header' flag indicates whether we are encoding spaces as _ as per RFC
    1522.N�rr�
c���|r.|dddvr'|j|ddt|dd�z|z�y|dk(r|jt|�|z�y|j||z�y)N���r
�.)�writer)�s�output�lineEnds   rr$zencode.<locals>.write;sf��
��2�3��6�!��L�L��3�B��%��"�#��-�/�'�9�:�
�$�Y��L�L��q��G�+�,��L�L��W��%rrr"rr�s=
)r')r�readr$�readlinerrr�append�EMPTYSTRING�join�len�MAXLINESIZE)
�inputr&rr�data�odatar$�prevline�line�outline�strippedr�thislines
             rrr,s\�����z�z�|���t�y��@�����U�����&��H��.�.�"�
"�$�
"��������9������9�D��H��A��q�d��A��A�y�&�1��!�H���!�t�)����t�$����q�!�����(�O��#�#�G�,���(�m�k�)�
�(�>�K��M�*�F�;���A�
��/�H�	�(�m�k�)���9�.�.�"�
"�$�
"�<��
�h��)�rc��t�t|||��Sddlm}||�}|�}t||||�|j	�S)Nrr	��BytesIO)r�ior:r�getvalue)r%rrr:�infp�outfps      rrrgsE��
���a�9�V�<�<���1�:�D��I�E�
�4��	�6�*��>�>��rc	�N�t�/|j�}t||��}|j|�yd}|j�x}�rGdt	|�}}|dkDr7||dz
|dk(r,d}	|dz
}|dkDr"||dz
|dvr|dz
}|dkDr||dz
|dvr�nd}	||kr�|||dz}
|
dk(r
|r|d	z}|dz}n�|
t
k7r||
z}|dz}n�|dz|k(r|	sd}	n�|dz|kr!||dz|d
zt
k(r|t
z}|d
z}na|d
z|krOt
||dz|d
z�r;t
||d
z|dz�r'|tt||dz|dz�f�z}|dz}n
||
z}|dz}||kr��|	s|j|dz�d}|j�x}r��G|r|j|�yy)z�Read 'input', apply quoted-printable decoding, and write to 'output'.
    'input' and 'output' are binary file objects.
    If 'header' is true, decode underscore as space (per RFC 1522).N�rrr	r(r s 	
rr��)	r
r)r$r*r.r�ishexr�unhex)r0r&rr1r2�newr4�i�n�partialrs           rrrrs��
���z�z�|���t�F�+�����U���

�C��.�.�"�
"�$�
"��#�d�)�1���q�5�T�!�A�#�a�[�E�)��G�Q�q�S���a�%�D��1��Q�K�8�3��a�C���a�%�D��1��Q�K�8�3��G��!�e��Q�q��s��A��D�y�V��D�j��a��c�!��f���A�g��1�Q�3�q��1����'���U��1��q��T�!�A�#�a��c�]�f�4��F�l���!��A��1��q��U�4��!��A�a�C�=�1�e�D��1��Q�q�S�M�6J��E�5��a��c�!�A�#��#7�"9�:�:���!��A��A�g��1�Q�3�q��!�e���L�L��u��%��C�3�.�.�"�
"�$�
"�4����S��rc��t�
t||��Sddlm}||�}|�}t|||��|j	�S)Nr@r	r9)r
r;r:rr<)r%rr:r=r>s     rrr�sA��
���a��'�'���1�:�D��I�E�
�4��v�&��>�>��rc�j�d|cxkxrdkncxs"d|cxkxrdkncxsd|cxkxrdkScS)zDReturn true if the byte ordinal 'c' is a hexadecimal digit in ASCII.�0�9�a�f�A�F�rs rrCrC�s8���1����F��� 1�T� 1�F�T�Q�5F�$�5F�F�5F�Frc��d}|D]u}t|f�}d|cxkrdkrnntd�}n9d|cxkrdkrnntd�dz
}nd	|cxkrd
krnntd	�dz
}|dzt|�z
z}�w|S)z.Get the integer value of a hexadecimal number.r	rKrL�0rMrN�a�
rOrPr)rr)r%�bitsrrFs    rrDrD�s����D�
���1�$�K���1�����C��A�
�Q�
�$�
��C����A�
�Q�
�$�
��D�	�"��A��B�w�#�a�&�1�*�%����Krc���ddl}ddl}	|j|jddd�\}}d}d}D]\}}|d	k(rd
}|dk(s�d
}�|r/|r-|j|_t
d�|jd�sd
g}d}	|D]�}
|
d
k(r|jj}n
	t|
d�}	|r!t||j
j�n!t||j
j|�|
d
k7s�w|j���|	r|j|	�yy#|j$rY}|j|_t
|�t
d�t
d�t
d�|jd�Yd}~��Xd}~wwxYw#t$r.}|jj|
�d|�d��d}	Yd}~��;d}~wwxYw#|
d
k7r|j�wwxYw)Nr	r(�tdz"usage: quopri [-t | -d] [file] ...z-t: quote tabsz-d: decode; default encoderAFz-tTz-dz -t and -d are mutually exclusive�-�rbz: can't open (z)
)�sys�getopt�argv�error�stderr�stdout�print�exit�stdin�buffer�open�OSErrorr$rr�close)r[r\�opts�args�msg�deco�tabs�orT�sts�file�fps            r�mainrq�s�������]�]�3�8�8�A�B�<��6�
��d��D��D����1���9�T�d���9�T�d�����Z�Z��
�
�0�1����������
�C����3�;����!�!�B�
��$��%��
	���r�3�:�:�,�,�-��r�3�:�:�,�,�d�3��s�{����
�#�$�����
���I�<�<���Z�Z��
�
�c�
�
�2�3�
���
�*�+��������
��0�
��
�
� � �D�#�!F�G�����
���s�{����
��s=�"D!�#F�0AG�!F	�0AF�F	�	G�#F>�>G�G�__main__)F)FF)�__doc__�__all__rr/rr,�binasciir
r�ImportErrorrrrrrrrCrDrq�__name__rQrr�<module>rxs���O�?��	
���������'�
2�3�9*�v�'�R�G�
�$*�\�z���F���y��
�F�
�F��s�A�	A�A

Hacked By AnonymousFox1.0, Coded By AnonymousFox