Hacked By AnonymousFox

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

�

�Q�fu$���	ddlZddlZddlZddgZdZej
eed��d�Zejd�jZ
Gd	�d
e�Zd�Z
d�Zd
�Zd�Zd�Zd�Zddgfd�Zdd�Zgfd�Zd�Zd�Zd�Zedk(re�yy)�N�getcaps�	findmatchztThe {name} module is deprecated and will be removed in Python {remove}. See the mimetypes module for an alternative.)��
)�removec��d|vrd|dfSy)N�linenor)�r�)�entrys �./opt/alt/python312/lib64/python3.12/mailcap.py�lineno_sort_keyrs���5���%��/�!�!��z[^\xa1-\U0010FFFF\w@+=:,./-]c��eZdZy)�UnsafeMailcapInputN)�__name__�
__module__�__qualname__rrr
rrs��3rrc��	i}d}t�D]V}	t|d�}|5t||�\}}ddd�j	�D]\}}||vr|||<�|||z||<��X|S#t$rY�fwxYw#1swY�IxYw)Nr�r)�listmailcapfiles�open�OSError�_readmailcapfile�items)�capsr	�mailcap�fp�morecaps�key�values       r
rrs�����D�
�F�#�%��	��g�s�#�B��/��F�;��H�f��"�.�.�*�J�C���$�;�!��S�	� ��I��-��S�	�	+�&��K���	��	��
�R�s�A+�A:�+	A7�6A7�:B	c��	dtjvr4tjd}|jtj�}|Sdtjvrtjd}nd}|dzdddg}|S)N�MAILCAPS�HOME�.z	/.mailcapz/etc/mailcapz/usr/etc/mailcapz/usr/local/etc/mailcap)�os�environ�split�pathsep)�pathstr�mailcaps�homes   r
rr9sw��A��R�Z�Z���*�*�Z�(���=�=����,���O��R�Z�Z���:�:�f�%�D��D��;�&��"�$<�>���Orc�\�	tjdtd�t|d�\}}|S)Nz2readmailcapfile is deprecated, use getcaps instead�)�warnings�warn�DeprecationWarningr)rr�_s   r
�readmailcapfiler3Ks.��I��M�M�F�$�a�)��r�4�(�G�D�!��Krc�*�	i}|j�x}r�|ddk(s|j�dk(r�.|}|dddk(r%|j�}|sd}|dd|z}|dddk(r�%t|�\}}|r|s�p|�
||d<|dz
}|jd	�}t	t|��D]}||j�||<�d	j
|�j�}||vr||j|�n|g||<|j�x}r��||fS)
Nr�#����z\
�
r	r
�/)	�readline�strip�	parseliner(�range�len�join�lower�append)	rr	r�line�nextliner �fields�types�js	         r
rrSs<����D��+�+�-�
�$�
���7�c�>�T�Z�Z�\�R�/�����r�s�m�v�%��{�{�}�H���X����9�x�'�D��r�s�m�v�%�
 ��o���V������%�F�8���a�K�F��	�	�#����s�5�z�"�A��Q�x�~�~�'�E�!�H�#��h�h�u�o�#�#�%���$�;���I���V�$���D��I�5�+�+�-�
�$�
�6��<�rc�z�	g}dt|�}}||kr,t|||�\}}|j|�|dz}||kr�,t|�dkry|d|d|dd}}}d|i}|D]P}|jd�}|dkr|}d}	n)|d|j	�}||dzdj	�}	||vr�L|	||<�R||fS)Nrr
r.�NN�view�=r6)r>�
parsefieldrA�findr;)
rBrD�i�n�fieldr rI�rest�fkey�fvalues
          r
r<r<zs����
�F��c�$�i�q�A�
�a�%��d�A�q�)���q��
�
�e��
�a�C���a�%��6�{�Q����Q�i����F�1�2�J�t��C��d�^�F����J�J�s�O���q�5��D��F���!�9�?�?�$�D��1�Q�3�4�[�&�&�(�F��6�>��!�F�4�L����;�rc�~�	|}||kr!||}|dk(rn|dk(r|dz}n|dz}||kr�!|||j�|fS)N�;�\r.r
)r;)rBrMrN�start�cs     r
rKrK�sb��9�
�E�
�a�%���G����8��
�$�Y��!��A��!��A��a�%���a�=��� �!�#�#rrIz	/dev/nullc��	t|�r!d|�d�}tj|t�yt	|||�}|D]M}d|vr.t|d||�}|��|rt
j|�dk7r�5t|||||�}	|	��I|	|fcSy)Nz&Refusing to use mailcap with filename z . Use a safe temporary filename.rH�testr)�_find_unsafer/r0r�lookup�substr&�system)
r�MIMEtyper �filename�plist�msg�entries�erY�commands
          r
rr�s�����H��\d�f���
�
�c�-�.���T�8�S�)�G�
���Q�;���6��H�e�4�D��|����	�	�$��1�,����#���(�E�:�����A�:���rc���g}||vr|||z}|jd�}|ddz}||vr|||z}|�|D�cgc]	}||vs�|��}}t|t��}|Scc}w)Nr9rz/*)r )r(�sortedr)rr^r rb�	MIMEtypesrcs      r
r[r[�s����G��4���D��N�*�����s�#�I���|�d�"�H��4���D��N�*��
��%�2�g�����1�g��2��W�/�2�G��N��3s�	A�Ac�*�d}dt|�}}||kr�||}|dz}|dk7r|dk(r
|||dz}|dz}||z}n�||}|dz}|dk(r||z}n�|dk(r||z}n�|dk(r2t|�r!d|�d	�}tj|t�y||z}nz|d
k(rm|}	||kr||dk7r|dz}||kr	||dk7r�||	|}
|dz}t|
|�}t|�r$d|�d
|
�d�}tj|t�y||z}n|dz|z}||kr��|S)Nr6rr
�%rU�s�tz!Refusing to substitute MIME type z into a shell command.�{�}z!Refusing to substitute parameter z (z) into a shell command)r>rZr/r0r�	findparam)rOr^r_r`�resrMrNrWrarV�name�params            r
r\r\�se��
�C��c�%�j�q�A�
�a�%��!�H��!�A�#�a���8��D�y��!�A�a�C�L��a��c�!���'�C��a��A�a��c�!��C�x��A�g���c���H�n���c����)�Ya�c�C��M�M�#�'9�:���H�n���c�����!�e��a��C���!��A��!�e��a��C���U�1�~���a�C��!�$��.����&�]b�dh�i�C��M�M�#�'9�:���E�k��
�C�i�!�m��E�a�%�F�Jrc��|j�dz}t|�}|D]}|d|j�|k(s�||dcSy)NrJr6)r@r>)rpr`rN�ps    r
rnrn�sI���:�:�<�#��D��D�	�A�
���R�a�5�;�;�=�D� ��Q�R�5�L��rc���ddl}t�}|jddst|�yt	dt|j�d�D]�}|j||dz}t|�dkr
t
d�y|d}|d}t||d|�\}}|st
dt��^t
d|�tj|�}tj|�}|s��t
d|���y)	Nrr
r.z"usage: mailcap [MIMEtype file] ...rIzNo viewer found forz
Executing:zExit status:)�sysr�argv�showr=r>�printr�typer&r]�waitstatus_to_exitcode)	rurrM�argsr^�filerdrc�stss	         r
rYrYs�����9�D��8�8�A�B�<��T�
��
�1�c�#�(�(�m�Q�
'���x�x��!�A�#����t�9�q�=��6�7����7���A�w���t�X�v�t�<�
�����'��.��,��(��)�)�G�$�C��+�+�C�0�C���n�c�*�(rc�X�td�t�D]}td|z��t�|s
t�}td�t�t|�}|D]G}t|�||}|D]0}t|�}|D]}td|z||��t��2�Iy)NzMailcap files:�	zMailcap entries:z  %-15s)rxrrrf)r�fn�ckeysryrbrc�keys�ks        r
rwrws���	�
��� ��%��r�	�"2� �	�G���	��	�
��	�G��4�L�E���
�d���t�*���A��!�9�D����i�!�m�Q�q�T�*���G�	�r�__main__)N)r&r/�re�__all__�_DEPRECATION_MSG�_deprecatedrr�compile�searchrZ�Warningrrrr3rr<rKrr[r\rnrYrwrrr
�<module>r�s���+�	��	��[�
!��#������X�/��@���r�z�z�9�:�A�A��4��4��4�$�%�N�>$� #)�;�b��6�,.�'�R�+�.�"�z���F�r

Hacked By AnonymousFox1.0, Coded By AnonymousFox