ok

Mini Shell

Direktori : /opt/imunify360/venv/lib64/python3.11/site-packages/aiohttp/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/aiohttp/__pycache__/cookiejar.cpython-311.pyc

�

m��fW5��"�ddlZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZmZddl
mZmZmZmZmZmZmZmZmZmZmZddlmZddlmZmZddlmZm Z dd	l!m"Z"m#Z#m$Z$d
Z%ee&dfZ'Gd�d
e��Z(Gd�de��Z)dS)�N)�defaultdict)�
BaseCookie�Morsel�SimpleCookie)�DefaultDict�Dict�Iterable�Iterator�List�Mapping�Optional�Set�Tuple�Union�cast)�URL�)�AbstractCookieJar�ClearCookiePredicate)�
is_ip_address�next_whole_second)�LooseCookies�PathLike�StrOrURL)�	CookieJar�DummyCookieJar�Morsel[str]c���eZdZdZejd��Zejd��Zejd��Zejdej	��Z
ejd��Zejj
�ejj���Zej�d��Zd	d
ddd�d
ededeeeedfdeejddf
�fd�Zdeddfd�Zdeddfd�Zd/deeddfd�Z de!ddfd�Z"d0d�Z#de$fd�Z%d1d�Z&dejde!de!d e!ddf
d!�Z'e(��fd"e)d#e(ddfd$�Z*e(��fd%e(ded&fd'�Z+e,de!d(e!defd)���Z-e,d*e!d+e!defd,���Z.e/d-e!deejfd.���Z0�xZ1S)2rz/Implements cookie storage adhering to RFC 6265.z][\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]*(?P<token>[\x00-\x08\x0A-\x1F\d:a-zA-Z\x7F-\xFF]+)z(\d{1,2}):(\d{1,2}):(\d{1,2})z	(\d{1,2})zG(jan)|(feb)|(mar)|(apr)|(may)|(jun)|(jul)|(aug)|(sep)|(oct)|(nov)|(dec)z	(\d{2,4})��tzinfoi���FTN)�unsafe�quote_cookie�treat_as_secure_origin�loopr!r"r#r$�returnc�p��t���|���tt��|_t��|_||_||_|�g}not|t��r|���g}nDt|t��r#t|�����g}nd�|D��}||_
t��|_i|_|j|_	|j���dS#t($r|j|_YdSwxYw)N�r$c��g|]L}t|t��r!t|�����n|�����MS�)�
isinstance�strr�origin)�.0�urls  �H/opt/imunify360/venv/lib64/python3.11/site-packages/aiohttp/cookiejar.py�
<listcomp>z&CookieJar.__init__.<locals>.<listcomp>QsT��&�&�&��&0��S�%9�%9�K��C�����!�!�!�s�z�z�|�|�&�&�&�)�super�__init__rr�_cookies�set�_host_only_cookies�_unsafe�
_quote_cookier*rr,r+�_treat_as_secure_originr�_next_expiration�_expirations�MAX_TIME�	_max_time�	timestamp�
OverflowError�MAX_32BIT_TIME)�selfr!r"r#r$�	__class__s     �r/r3zCookieJar.__init__;sS���	�����d��#�#�#�IT��J
�J
��
�9<��������)���!�)�%'�"�"�
�.��
4�
4�	�&<�&C�&C�&E�&E�%F�"�"�
�.��
4�
4�	�&)�*@�&A�&A�&H�&H�&J�&J�%K�"�"�&�&�1�&�&�&�"�(>��$� 1� 3� 3���KM�������	1��N�$�$�&�&�&�&�&���	1�	1�	1�!�0�D�N�N�N�N�	1���s�D�D5�4D5�	file_pathc���tj|��}|�d���5}tj|j|tj��ddd��dS#1swxYwYdS)N�wb��mode)�pathlib�Path�open�pickle�dumpr4�HIGHEST_PROTOCOL�rArC�fs   r/�savezCookieJar.save_s����L��+�+�	�
�^�^��^�
&�
&�	C�!��K��
�q�&�*A�B�B�B�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C����	C�	C�	C�	C�	C�	Cs�&A�A"�%A"c��tj|��}|�d���5}tj|��|_ddd��dS#1swxYwYdS)N�rbrF)rHrIrJrK�loadr4rNs   r/rSzCookieJar.loadds����L��+�+�	�
�^�^��^�
&�
&�	+�!�"�K��N�N�D�M�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�	+�	+s�A�A�A�	predicatec���|�`t��|_|j���|j���|j���dSg}tj�tjj	��}|j�
��D]a\\}}}|�
��D]D\}}|||f}	|	|jvr|j|	|ks||��r|�|	���E�b|D]^\}}}|j�||f��|||f}	|	|jvr|j|||f=|j||f�
|d���_t|j���|j���}
	|
�d���t
jd���z|_dS#t&$r|j|_YdSwxYw)N)�defaultr)�microsecondr��seconds)rr:r4�clearr6r;�datetime�now�timezone�utc�items�append�discard�pop�min�valuesr=�replace�	timedeltar?)rArT�to_delr\�domain�path�cookie�name�morsel�key�next_expirations           r/rZzCookieJar.clearis)����$5�$7�$7�D�!��M���!�!�!��#�)�)�+�+�+���#�#�%�%�%��F�����#�#�H�$5�$9�:�:��&*�m�&9�&9�&;�&;�	'�	'�"�N�V�T�F� &�����
'�
'���f��t�T�*���4�,�,�,��1B�3�1G�3�1N�1N��Y�v�&�&�2O��M�M�#�&�&�&��
'�#)�	:�	:��F�D�$��#�+�+�V�T�N�;�;�;��4��&�C��d�'�'�'��%�v�t�T�&:�;��M�6�4�.�)�-�-�d�D�9�9�9�9��d�/�6�6�8�8�$�.�Q�Q�Q��	3�$3�$;�$;��%<�%�%��"�1�-�-�-�%.�D�!�!�!���	3�	3�	3�$(�N�D�!�!�!�!�	3���s�1G�G*�)G*rhc�<�������fd���dS)Nc�<�����|d��S)Nrh)�_is_domain_match)�xrhrAs ��r/�<lambda>z(CookieJar.clear_domain.<locals>.<lambda>�s���T�2�2�6�1�X�;�G�G�r1�rZ�rArhs``r/�clear_domainzCookieJar.clear_domain�s)�����
�
�G�G�G�G�G�H�H�H�H�Hr1�Iterator[Morsel[str]]c#�K�|���|j���D]}|���Ed{V���dS�N)�_do_expirationr4rd)rA�vals  r/�__iter__zCookieJar.__iter__�sb�����������=�'�'�)�)�	$�	$�C��z�z�|�|�#�#�#�#�#�#�#�#�	$�	$r1c�4�td�|D����S)Nc3�K�|]}dV��dS)rNr))r-�is  r/�	<genexpr>z$CookieJar.__len__.<locals>.<genexpr>�s"����#�#��1�#�#�#�#�#�#r1)�sum�rAs r/�__len__zCookieJar.__len__�s���#�#�d�#�#�#�#�#�#r1c�2�|�d���dS)Nc��dS)NFr))rrs r/rsz*CookieJar._do_expiration.<locals>.<lambda>�s��U�r1rtr�s r/rzzCookieJar._do_expiration�s���
�
�?�?�#�#�#�#�#r1�whenrirkc�T�t|j|��|_||j|||f<dSry)rcr:r;)rAr�rhrirks     r/�_expire_cookiezCookieJar._expire_cookie�s3��!$�D�$9�4� @� @���26���6�4��.�/�/�/r1�cookies�response_urlc���|j}|jst|��rdSt|t��r|���}|D�]\}}t|t��st��}|||<||}|d}|�d��rd}|d=|s%|�#|j	�
||f��|x}|d<|�d��r|dd�}||d<|r|�||��s��|d}|r|�d��sD|j
}|�d��sd}n d|d|�d���z}||d<|d}	|	r�	t|	��}
	t j�t jj��t!j|
�	��z}n#t*$r
|j}YnwxYw|�||||��nT#t0$rd|d<YnCwxYw|d
}|r5|�|��}
|
r|�|
|||��nd|d
<||j||f|<��|���dS)zUpdate cookies.Nrh�.�rri�/zmax-agerX�expires)�raw_hostr7rr*rr_rr�endswithr6�add�
startswithrqri�rfind�intr[r\r]r^rfr?r=r��
ValueError�_parse_dater4rz)rAr�r��hostnamerkrj�tmprhri�max_age�
delta_seconds�max_age_expirationr��expire_times              r/�update_cookieszCookieJar.update_cookies�s
���(���|�	�
�h� 7� 7�	��F��g�w�'�'�	&��m�m�o�o�G�#�>	9�>	9�L�D�&��f�f�-�-�
#�)5����"��D�	��T����H�%�F����s�#�#�
%����8�$��
5�h�2��'�+�+�X�t�,<�=�=�=�,4�4����)�� � ��%�%�
*�������#)��x� ��
�� 5� 5�f�h� G� G�
���&�>�D��
&�t���s�3�3�
&�#�(�����s�+�+�;��D�D���a�$�*�*�S�/�/�&9�!:�:�D�!%��v���Y�'�G��
/�
+�$'��L�L�M�<�-5�->�-B�-B�$�-�1�.�.�$�.�}�E�E�E�.F�*�*��)�<�<�<�-1�^�*�*�*�<�����'�'�(:�F�D�$�O�O�O�O��!�+�+�+�(*�F�9�%�%�%�+����!��+���/�"&�"2�"2�7�";�";�K�"�/��+�+�K���t�L�L�L�L�,.��y�)�28�D�M�6�4�.�)�$�/�/��������s7�5G:�AG
�	G:�
G�G:�G�G:�:H�H�request_url)�BaseCookie[str]zSimpleCookie[str]c	�L�|���t|��}|jrt��n
t	��}|jpd}t��}t
jt��5|�	��}ddd��n#1swxYwY|j
dvo||jv}|D]�}|j}|d}|s|j
||<�|jst|��r�5||f|jvr||kr�Gn|�||��s�_|�|j|d��s��|r	|dr��t)d|�|jt-������}	|	�|j|j
|j��|	||<��|S)z8Returns this jar's cookies filtered by their attributes.r�N)�https�wssrhri�securer)rzrr8rrr��
contextlib�suppressr�r,�schemer9rm�valuer7rr6rq�_is_path_matchrir�getrr5�coded_value)
rAr��filteredr��request_origin�
is_not_securerjrkrh�mrsl_vals
          r/�filter_cookieszCookieJar.filter_cookies�s��	
�������+�&�&��"�0�B�L�N�N�N�j�l�l�	��'�-�2������
�
 ��
,�
,�	2�	2�(�/�/�1�1�N�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�
��&6�6�
C��d�&B�B�	�
�	&�	&�F��:�D��H�%�F��
�!'�������<�
�M�(�$;�$;�
����~��!8�8�8��X�%�%��&��*�*�6�8�<�<�
���&�&�{�'7����H�H�
���
���!1�
���M�6�:�:�f�j�&�(�(�+K�+K�L�L�H��L�L���V�\�6�3E�F�F�F�%�H�T�N�N��s�7B�B�Br�c��||krdS|�|��sdS|dt|���}|�d��sdSt|��S)z0Implements domain matching adhering to RFC 6265.TFNr�)r��lenr)rhr��non_matchings   r/rqzCookieJar._is_domain_matchsq���v����4�� � ��(�(�	��5���3�v�;�;�,��/���$�$�S�)�)�	��5� ��*�*�*�*r1�req_path�cookie_pathc���|�d��sd}||krdS|�|��sdS|�d��rdS|t|��d�}|�d��S)z.Implements path matching adhering to RFC 6265.r�TFN)r�r�r�)r�r�r�s   r/r�zCookieJar._is_path_match.s����"�"�3�'�'�	��H��{�"�"��4��"�"�;�/�/�	��5�����$�$�	��4���K� 0� 0� 2� 2�3���&�&�s�+�+�+r1�date_strc	��|sdSd}d}d}d}dx}x}}d}	d}
d}|j�|��D�]}|�d��}
|sA|j�|
��}|r%d}d�|���D��\}}}�[|s@|j�|
��}|r$d}t|�����}	��|s/|j�|
��}|rd}|j	�J�|j	}
��|s?|j
�|
��}|r#d}t|�����}��d|cxkrdkr	nn|d	z
}nd|cxkrd
krnn|dz
}d||||fvrdSd|	cxkrd
ksndS|dks|dks|dks|dkrdStj||
|	|||tjj
���S)z4Implements date string parsing adhering to RFC 6265.NFr�tokenTc3�4K�|]}t|��V��dSry)r�)r-�ss  r/r�z(CookieJar._parse_date.<locals>.<genexpr>Ys(����+P�+P�q�C��F�F�+P�+P�+P�+P�+P�+Pr1�F�cil�Ei�r�iA��;r)�DATE_TOKENS_RE�finditer�group�DATE_HMS_TIME_RE�match�groups�DATE_DAY_OF_MONTH_REr��
DATE_MONTH_RE�	lastindex�DATE_YEAR_REr[r]r^)�clsr��
found_time�	found_day�found_month�
found_year�hour�minute�second�day�month�year�token_matchr��
time_match�	day_match�month_match�
year_matchs                  r/r�zCookieJar._parse_dateAsr���	��4��
��	����
�!"�"��"�v���������-�6�6�x�@�@�	3�	3�K��%�%�g�.�.�E��
� �1�7�7��>�>�
���!%�J�+P�+P�J�<M�<M�<O�<O�+P�+P�+P�(�D�&�&���
��4�:�:�5�A�A�	��� $�I��i�o�o�/�/�0�0�C���
�!�/�5�5�e�<�<����"&�K�&�0�<�<�<�'�1�E���
3� �-�3�3�E�:�:�
��3�!%�J��z�/�/�1�1�2�2�D��
�������������D�L�D�D�
�$�_�_�_�_�"�_�_�_�_�_��D�L�D��Y��Z��D�D�D��4��C�~�~�~�~�2�~�~�~�~��4��$�;�;�$��)�)�v��{�{�f�r�k�k��4�� ��%��d�F�F�8�;L�;P�
�
�
�	
r1ry�r%rw)r%N)2�__name__�
__module__�__qualname__�__doc__�re�compiler�r�r��Ir�r�r[�maxrer]r^r<�utcfromtimestampr@�boolrrrr
�asyncio�AbstractEventLoopr3rrPrSrrZr+rvr|r�r�rzr�rrr�r��staticmethodrqr��classmethodr��
__classcell__�rBs@r/rr$s��������9�9��R�Z�	>���N�
"�r�z�"B�C�C��%�2�:�l�3�3���B�J�T�
����M�
�2�:�l�+�+�L�� �$�,�,�H�4E�4I�,�J�J�H��&�7�7�	�B�B�N�
�!�HL�48�
"1�"1�"1��"1��	"1�
!&�h��X���&D� E�"1��w�0�1�
"1�
�"1�"1�"1�"1�"1�"1�HC�h�C�4�C�C�C�C�
+�h�+�4�+�+�+�+�
3�3�x�(<�=�3��3�3�3�3�BI�3�I�4�I�I�I�I�$�$�$�$�
$��$�$�$�$�$�$�$�$�7��%�7�/2�7�:=�7�EH�7�	
�7�7�7�7�IL����K�K�l�K�#�K�RV�K�K�K�K�\"%����1�1��1�	�5�	6�1�1�1�1�f�
+��
+��
+��
+�
+�
+��\�
+��,��,�3�,�4�,�,�,��\�,�$�?
�3�?
�8�H�4E�+F�?
�?
�?
��[�?
�?
�?
�?
�?
r1rc����eZdZdZdd�deejddf�fd�Zdd�Zde	fd	�Z
dd
eeddfd�Zde
ddfd
�Ze��fdededdfd�Zdeddfd�Z�xZS)rzxImplements a dummy cookie storage.

    It can be used with the ClientSession when no cookie processing is needed.

    Nr'r$r%c�L��t���|���dS)Nr')r2r3)rAr$rBs  �r/r3zDummyCookieJar.__init__�s$���
�����d��#�#�#�#�#r1rwc#�
K�dSryr)r�s r/r|zDummyCookieJar.__iter__�s����	�	r1c��dS)Nrr)r�s r/r�zDummyCookieJar.__len__�s���qr1rTc��dSryr))rArTs  r/rZzDummyCookieJar.clear�����r1rhc��dSryr)rus  r/rvzDummyCookieJar.clear_domain�r�r1r�r�c��dSryr))rAr�r�s   r/r�zDummyCookieJar.update_cookies�r�r1r�r�c��t��Sry)r)rAr�s  r/r�zDummyCookieJar.filter_cookies�s���~�~�r1r�ry)r�r�r�r�r
r�r�r3r|r�r�rrZr+rvrrr�r�r�r�s@r/rr�sK���������GK�$�$�$���)B� C�$�t�$�$�$�$�$�$�����������
�
�x�(<�=�
��
�
�
�
�
�3�
�4�
�
�
�
�IL����
�
�l�
�#�
�RV�
�
�
�
��#��2C��������r1r)*r�r�r[�osrHrKr��collectionsr�http.cookiesrrr�typingrrr	r
rrr
rrrr�yarlr�abcrr�helpersrr�typedefsrrr�__all__r+�
CookieItemrrr)r1r/�<module>rs���������������	�	�	�	�����
�
�
�
�	�	�	�	�#�#�#�#�#�#�9�9�9�9�9�9�9�9�9�9���������������������������������8�8�8�8�8�8�8�8�5�5�5�5�5�5�5�5�6�6�6�6�6�6�6�6�6�6�
)���3�
�%�
&�
�]
�]
�]
�]
�]
�!�]
�]
�]
�@�����&�����r1

Zerion Mini Shell 1.0