403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/keyrings/alt/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/keyrings/alt/__pycache__/file_base.cpython-311.pyc
�

<&c���ddlmZddlZddlZddlZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZGd
�d��ZGd�d
ee
��ZdS)�)�with_statementN)�encodebytes�decodebytes)�
properties)�PasswordDeleteError)�KeyringBackend)�	platform_�)�escapec��eZdZejd���Zejd���Zejd���Z	ejd���Z
ejd���Zd�ZdS)�
FileBackedc��dS)z;
        The filename used to store the passwords.
        N���selfs �8/usr/lib/python3/dist-packages/keyrings/alt/file_base.py�filenamezFileBacked.filename�����c�n�tj�tj��|j��S)z�
        The path to the file where passwords are stored. This property
        may be overridden by the subclass or at the instance level.
        )�os�path�joinr	�	data_rootrrs r�	file_pathzFileBacked.file_paths%���w�|�|�I�/�1�1�4�=�A�A�Arc��dS)zD
        The encryption scheme used to store the passwords.
        znot definedrrs r�schemezFileBacked.schemes	��
�}rc��dS)zE
        The encryption version used to store the passwords.
        Nrrs r�versionzFileBacked.version&�	��
�trc��dS)zM
        The encryption version used in file to store the passwords.
        Nrrs r�file_versionzFileBacked.file_version-r rc�8�d}|jdit����S)NzS<{self.__class__.__name__} with {self.scheme} v.{self.version} at {self.file_path}>r)�format�locals)r�tmpls  r�__repr__zFileBacked.__repr__4s*��
4�	
��t�{�&�&�V�X�X�&�&�&rN)
�__name__�
__module__�__qualname__�abc�abstractpropertyrr�NonDataPropertyrrrr"r'rrrr
r
s��������������
��B�B� ��B�	�������	����������� ���'�'�'�'�'rr
c�z�eZdZdZejdd���Zejdd���Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
dS)�Keyringa
    BaseKeyring is a file-based implementation of keyring.

    This keyring stores the password directly in the file and provides methods
    which may be overridden by subclasses to support
    encryption and decryption. The encrypted payload is stored in base64
    format.
    Nc��dS)z�
        Given a password (byte string) and assoc (byte string, optional),
        return an encrypted byte string.

        assoc provides associated data (typically: service and username)
        Nr)r�password�assocs   r�encryptzKeyring.encryptFrrc��dS)z�
        Given a password encrypted by a previous call to `encrypt`, and assoc
        (byte string, optional), return the original byte string.

        assoc provides associated data (typically: service and username)
        Nr)r�password_encryptedr2s   r�decryptzKeyring.decryptOrrc��|�||��}t|��}t|��}tj��}tj�|j��r|�|j��	|�	||���
��}t|��}	|�||���
d��}n8#t$r+|�|���
d��}YnwxYwn##tjtjf$rd}YnwxYw|S)z2
        Read the password from the file.
        �utf-8N)�_generate_assoc�escape_for_ini�configparser�RawConfigParserrr�existsr�read�get�encoderr6�decode�
ValueError�
NoOptionError�NoSectionError)r�service�usernamer2�config�password_base64r5r1s        r�get_passwordzKeyring.get_passwordXsE���$�$�W�h�7�7�� ��)�)��!�(�+�+���-�/�/��
�7�>�>�$�.�)�)�	(��K�K���'�'�'�	�$�j�j��(�;�;�B�B�D�D�O�!,�_�!=�!=��
L��<�<�(:�E�B�B�I�I�'�R�R�����
L�
L�
L��<�<�(:�;�;�B�B�7�K�K����
L�������*�L�,G�H�	�	�	��H�H�H�	�����s6�7D"�?)C)�(D"�)2D�D"�D�D"�"E�Ec�d�|std���t|t��std���|�||��}|�|�d��|��}dt|�����z}|�	|||��dS)zWrite the password in the file.zUsername cannot be blank.z/Password should be a unicode string, not bytes.r8�
N)
rB�
isinstance�str�	TypeErrorr9r3r@rrA�_write_config_value)rrErFr1r2r5rHs       r�set_passwordzKeyring.set_passwordts����	:��8�9�9�9��(�C�(�(�	O��M�N�N�N��$�$�W�h�7�7��!�\�\�(�/�/�'�*B�*B�E�J�J����-?�!@�!@�!G�!G�!I�!I�I��� � ��(�O�D�D�D�D�Drc�j�t|��dzt|��z���S)z7Generate tamper resistant bytestring of associated dataz\0)r:r@)rrErFs   rr9zKeyring._generate_assoc�s.���w�'�'�%�/�.��2J�2J�J�R�R�T�T�Trc���|���tj��}|�|j��t|��}t|��}|�|��s|�|��|�|||��t|jd��5}|�
|��ddd��dS#1swxYwYdS)N�w)�_ensure_file_pathr;r<r>rr:�has_section�add_section�set�open�write)rrE�key�valuerG�config_files      rrOzKeyring._write_config_value�s����� � � ��-�/�/�����D�N�#�#�#� ��)�)���S�!�!���!�!�'�*�*�	(����w�'�'�'��
�
�7�C��'�'�'��$�.�#�
&�
&�	&�+��L�L��%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�	&�	&s�6C�C� Cc��tj�|j��}|otj�|��}|rtj|��tj�|j��sLt|jd��5	ddd��n#1swxYwYd}tj|j|��dSdS)zm
        Ensure the storage path exists.
        If it doesn't, create it with "go-rwx" permissions.
        rSNi�)	rr�dirnamer�isdir�makedirs�isfilerX�chmod)r�storage_root�needs_storage_root�user_read_writes    rrTzKeyring._ensure_file_path�s���
�w���t�~�6�6��)�M�"�'�-�-��2M�2M�.M���	&��K��%�%�%��w�~�~�d�n�-�-�	6��d�n�c�*�*�
�
��
�
�
�
�
�
�
�
�
�
�
����
�
�
�
�#�O��H�T�^�_�5�5�5�5�5�	6�	6s�B$�$B(�+B(c��t|��}t|��}tj��}tj�|j��r|�|j��	|�||��std���n"#tj
$rtd���wxYwt|jd��5}|�|��ddd��dS#1swxYwYdS)z4Delete the password for the username of the service.zPassword not foundrSN)
r:r;r<rrr=rr>�
remove_optionrrDrXrY)rrErFrGr\s     r�delete_passwordzKeyring.delete_password�s=�� ��)�)��!�(�+�+���-�/�/��
�7�>�>�$�.�)�)�	(��K�K���'�'�'�	<��'�'���:�:�
@�)�*>�?�?�?�
@���*�	<�	<�	<�%�&:�;�;�;�	<�����$�.�#�
&�
&�	&�+��L�L��%�%�%�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�	&�	&s�1%B�B6�C1�1C5�8C5)N)r(r)r*�__doc__r+�abstractmethodr3r6rIrPr9rOrTrhrrrr/r/<s���������	��������	�����������8
E�
E�
E�U�U�U�&�&�&�(6�6�6� &�&�&�&�&rr/)�
__future__rrr+r;�base64rr�jaraco.classesr�keyring.errorsr�keyring.backendr�keyring.utilr	rr:r
r/rrr�<module>rqs��%�%�%�%�%�%�	�	�	�	�
�
�
�
�����+�+�+�+�+�+�+�+�%�%�%�%�%�%�.�.�.�.�.�.�*�*�*�*�*�*�"�"�"�"�"�"�,�,�,�,�,�,�)'�)'�)'�)'�)'�)'�)'�)'�X}&�}&�}&�}&�}&�j�.�}&�}&�}&�}&�}&r

Youez - 2016 - github.com/yon3zu
LinuXploit