403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.11/site-packages/ansible/galaxy/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/galaxy/__pycache__/token.cpython-311.opt-1.pyc
�

���c���ddlmZmZmZeZddlZddlZddlZddl	m
Z
mZddlm
ZddlmZddlmZmZmZddlmZmZddlmZdd	lmZe��ZGd
�de��ZGd�d
e��ZGd�de��Z Gd�de��Z!dS)�)�absolute_import�division�print_functionN)�S_IRUSR�S_IWUSR)�	constants)�
user_agent)�to_bytes�	to_native�to_text)�	yaml_dump�	yaml_load)�open_url)�Displayc��eZdZdZd�ZdS)�NoTokenSentinelze Represents an ansible.cfg server with not token defined (will ignore cmdline and GALAXY_TOKEN_PATH. c��|S�N�)�cls�args�kwargss   �9/usr/lib/python3.11/site-packages/ansible/galaxy/token.py�__new__zNoTokenSentinel.__new__)s���
�N)�__name__�
__module__�__qualname__�__doc__rrrrrr's)������o�o�����rrc�0�eZdZdZdZd	d�Zd�Zd�Zd�ZdS)
�
KeycloakTokenzpA token granted by a Keycloak server.

    Like sso.redhat.com as used by cloud.redhat.com
    ie Automation Hub�BearerNTc�l�||_||_d|_||_||_|j�	d|_dSdS)Nzcloud-services)�access_token�auth_url�_token�validate_certs�	client_id)�selfr$r%r'r(s     r�__init__zKeycloakToken.__init__5sB��(��� ��
����,���"����>�!�-�D�N�N�N�"�!rc�&�d|j�d|j��S)Nz#grant_type=refresh_token&client_id=z&refresh_token=)r(r$�r)s r�
_form_payloadzKeycloakToken._form_payload>s"���KO�>�>�>�KO�K\�K\�^�	^rc�`�|jr|jS|���}tt|j��||jdt
�����}tjt|�
��d�����}|�d��|_|jS)N�POST)�datar'�method�
http_agent�surrogate_or_strict��errorsr$)r&r-rrr%r'r	�json�loadsr�read�get)r)�payload�respr0s    rr9zKeycloakToken.getBs����;�	��;���$�$�&�&���	�$�-�0�0�$�'+�':�%�#-�<�<�	1�1�1���z�'�$�)�)�+�+�6K�L�L�L�M�M���h�h�~�.�.����{�rc�L�i}|j�d|�����|d<|S�N� �
Authorization��
token_typer9�r)�headerss  rrCzKeycloakToken.headers_�+����.2�o�o�o�t�x�x�z�z�z�#J��� ��r)NNTN)	rrrrrAr*r-r9rCrrrr!r!-si��������
�J�.�.�.�.�^�^�^����:����rr!c�R�eZdZdZdZdd�Zed���Zd�Zd�Z	d�Z
d	�Zd
�ZdS)�GalaxyTokenz4 Class to storing and retrieving local galaxy token �TokenNc�b�ttjd���|_d|_||_dS)Nr3r4)r
�C�GALAXY_TOKEN_PATH�b_file�_configr&�r)�tokens  rr*zGalaxyToken.__init__js,���q�2�;P�Q�Q�Q����������rc��|j�|���|_|jr|jturdn|j|jd<|jS�NrN)rL�_readr&rr,s r�configzGalaxyToken.configpsN���<���:�:�<�<�D�L��;�	\�,0�K�?�,J�,J�D�D�PT�P[�D�L��!��|�rc�`�d}tj�|j��sPt	|jd�����tj|jttz��d}t	|jd��5}t|��}ddd��n#1swxYwYt�|�dt|j������|rFt|t��s1t�dt|j��z��iS|piS)N�Opened�w�Created�rr>z1Galaxy token file %s malformed, unable to read it)�os�path�isfilerK�open�close�chmodrrr�display�vvvr�
isinstance�dict)r)�action�frRs    rrQzGalaxyToken._read{s@�����w�~�~�d�k�*�*�	����c�"�"�(�(�*�*�*��H�T�[�'�G�"3�4�4�4��F�
�$�+�s�
#�
#�	"�q��q�\�\�F�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"�	"����	"�	"�	"�	"�	���v�v�v�w�t�{�';�';�';�<�=�=�=��	�*�V�T�2�2�	��K�K�K�g�VZ�Va�Nb�Nb�b�c�c�c��I��|��s�B(�(B,�/B,c�<�||_|���dSr)r&�saverMs  r�setzGalaxyToken.set�s������	�	�����rc�8�|j�dd��SrP)rRr9r,s rr9zGalaxyToken.get�s���{���w��-�-�-rc��t|jd��5}t|j|d���ddd��dS#1swxYwYdS)NrUF)�default_flow_style)r[rKr
rR)r)rcs  rrezGalaxyToken.save�s���
�$�+�s�
#�
#�	@�q��d�k�1��?�?�?�?�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@����	@�	@�	@�	@�	@�	@s
�;�?�?c�x�i}|���}|r!|j�d|�����|d<|Sr=)r9rA)r)rCrNs   rrCzGalaxyToken.headers�sA�������
�
���	O�26�/�/�/�4�8�8�:�:�:�'N�G�O�$��rr)
rrrrrAr*�propertyrRrQrfr9rerCrrrrFrFes�������>�>��J���������X�����&���.�.�.�@�@�@�����rrFc�<�eZdZdZdd�Zed���Zd�Zd�ZdS)�BasicAuthToken�BasicNc�0�||_||_d|_dSr)�username�passwordr&)r)rprqs   rr*zBasicAuthToken.__init__�s�� ��
� ��
�����rc��t|d����dt|dd���pd��}tjt|dd�����}t|��S)	Nr3r4�:�passthru)r5�	nonstring�zutf-8)�encodingr5)r�base64�	b64encoder
)rprqrN�b64_vals    r�
_encode_tokenzBasicAuthToken._encode_token�sl��"�8�4I�J�J�J�J�J�"�8�4I�U_�`�`�`�f�df�f�h���"�8�E�G�La�#b�#b�#b�c�c���w���rc�v�|jr|jS|�|j|j��|_|jSr)r&r{rprqr,s rr9zBasicAuthToken.get�s7���;�	��;���(�(����
�F�F����{�rc�L�i}|j�d|�����|d<|Sr=r@rBs  rrCzBasicAuthToken.headers�rDrr)	rrrrAr*�staticmethodr{r9rCrrrrmrm�sf�������J�����
� � ��\� ��������rrm)"�
__future__rrr�type�
__metaclass__rxrXr6�statrr�ansiblerrI�ansible.galaxy.user_agentr	�ansible.module_utils._textr
rr� ansible.module_utils.common.yamlr
r�ansible.module_utils.urlsr�ansible.utils.displayrr^�objectrr!rFrmrrr�<module>r�s���*C�B�B�B�B�B�B�B�B�B��
�
�
�
�
�	�	�	�	�����!�!�!�!�!�!�!�!�"�"�"�"�"�"�0�0�0�0�0�0�C�C�C�C�C�C�C�C�C�C�A�A�A�A�A�A�A�A�.�.�.�.�.�.�)�)�)�)�)�)�
�'�)�)�������f����5�5�5�5�5�F�5�5�5�p9�9�9�9�9�&�9�9�9�x�����V�����r

Youez - 2016 - github.com/yon3zu
LinuXploit