AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/oauthlib/oauth1/rfc5849/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/oauthlib/oauth1/rfc5849/__pycache__/parameters.cpython-310.pyc
o

���a��@s\dZddlmZmZddlmZmZddlmZej	ddd��Z
d	d
�Zdd�Zd
d�Z
dS)z�
oauthlib.parameters
~~~~~~~~~~~~~~~~~~~

This module contains methods related to `section 3.5`_ of the OAuth 1.0a spec.

.. _`section 3.5`: https://tools.ietf.org/html/rfc5849#section-3.5
�)�urlparse�
urlunparse)�extract_params�	urlencode�)�utilsNcCs�|pi}g}|D]\}}t�|�}t�|�}d�||�}|�|�qd�|�}	|r/d||	}	d|	}
i}|�|�|
|d<|S)a**Prepare the Authorization header.**
    Per `section 3.5.1`_ of the spec.

    Protocol parameters can be transmitted using the HTTP "Authorization"
    header field as defined by `RFC2617`_ with the auth-scheme name set to
    "OAuth" (case insensitive).

    For example::

        Authorization: OAuth realm="Example",
            oauth_consumer_key="0685bd9184jfhq22",
            oauth_token="ad180jjd733klru7",
            oauth_signature_method="HMAC-SHA1",
            oauth_signature="wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D",
            oauth_timestamp="137131200",
            oauth_nonce="4572616e48616d6d65724c61686176",
            oauth_version="1.0"


    .. _`section 3.5.1`: https://tools.ietf.org/html/rfc5849#section-3.5.1
    .. _`RFC2617`: https://tools.ietf.org/html/rfc2617
    z{}="{}"z, zrealm="%s", zOAuth %s�
Authorization)r�escape�format�append�join�update)�oauth_params�headers�realm�%authorization_header_parameters_parts�oauth_parameter_name�value�escaped_name�
escaped_value�part�authorization_header_parameters�authorization_header�full_headers�r�D/usr/lib/python3/dist-packages/oauthlib/oauth1/rfc5849/parameters.py�prepare_headerss&

��
rcCs&t|�}|�|�|jdd�d�|S)a>Append OAuth params to an existing set of parameters.

    Both params and oauth_params is must be lists of 2-tuples.

    Per `section 3.5.2`_ and `3.5.3`_ of the spec.

    .. _`section 3.5.2`: https://tools.ietf.org/html/rfc5849#section-3.5.2
    .. _`3.5.3`: https://tools.ietf.org/html/rfc5849#section-3.5.3

    cSs|d�d�S)Nr�oauth_)�
startswith)�irrr�<lambda>isz _append_params.<locals>.<lambda>)�key)�list�extend�sort)r�params�mergedrrr�_append_paramsXs
r'cCs
t||�S)z�Prepare the Form-Encoded Body.

    Per `section 3.5.2`_ of the spec.

    .. _`section 3.5.2`: https://tools.ietf.org/html/rfc5849#section-3.5.2

    )r')r�bodyrrr�prepare_form_encoded_bodyms
	r)cCs>t|�\}}}}}}tt|t|�pg��}t||||||f�S)z�Prepare the Request URI Query.

    Per `section 3.5.3`_ of the spec.

    .. _`section 3.5.3`: https://tools.ietf.org/html/rfc5849#section-3.5.3

    )rrr'rr)r�uri�sch�net�path�par�query�frarrr�prepare_request_uri_queryys
	�r1)NN)�__doc__�urllib.parserr�oauthlib.commonrr�r�
filter_paramsrr'r)r1rrrr�<module>sE

Anon7 - 2022
AnonSec Team