403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.216.115
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 :  /usr/lib/python3/dist-packages/keyring/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/keyring/__pycache__/backend.cpython-311.pyc
�

%�c���h�dZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZm
Z
ddlmZeje��Zejd��ZdZGd	�d
ej��ZGd�de�
��ZGd�d��ZGd�de��Zd�Ze
jd���ZGd�d��ZdS)z 
Keyring implementation support
�N)�Optional�)�metadata)�credentials�errors�util)�
properties�priorityc�"��eZdZdZ�fd�Z�xZS)�KeyringBackendMetazn
    A metaclass that's both an ABCMeta and a type that keeps a registry of
    all (non-abstract) types.
    c����t���|||��t|d��st��|_|j}|js|�|��dSdS)N�_classes)�super�__init__�hasattr�setr�__abstractmethods__�add)�cls�name�bases�dict�classes�	__class__s     ��1/usr/lib/python3/dist-packages/keyring/backend.pyrzKeyringBackendMeta.__init__sp���
������u�d�+�+�+��s�J�'�'�	!��5�5�C�L��,���&�	��K�K�������	�	�)�__name__�
__module__�__qualname__�__doc__r�
__classcell__)rs@rrrsB���������
��������rrc	�<�eZdZdZd�Zd�Zejd���Ze	d���Z
ejd���Zd�Ze
jded	ed
eefd���Ze
jded	eded
d
fd���Zded	ed
d
fd�Zded	eed
eejfd�Zd�Zd�Zd
S)�KeyringBackendz]The abstract base class of the keyring, every backend must implement
    this interface.
    c�.�|���dS�N)�set_properties_from_env)�selfs rrzKeyringBackend.__init__,s���$�$�&�&�&�&�&rc��dS)a�
        Each backend class must supply a priority, a number (float or integer)
        indicating the priority of the backend relative to all other backends.
        The priority need not be static -- it may (and should) vary based
        attributes of the environment in which is runs (platform, available
        packages, etc.).

        A higher number indicates a higher priority. The priority should raise
        a RuntimeError with a message indicating the underlying cause if the
        backend is not suitable for the current environment.

        As a rule of thumb, a priority between zero but less than one is
        suitable, but a priority of one or greater is recommended.
        N��rs rr
zKeyringBackend.priority0s���rc�l�tj��5}|jddd��n#1swxYwY|Sr%)r�ExceptionRaisedContextr
)r�excs  r�viablezKeyringBackend.viable@sq��
�
*�
,�
,�	���L�L�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	��w�s�(�,�,c�P�ttjd��|j��S)z6
        Return all subclasses deemed viable.
        r.)�filter�operator�
attrgetterrr*s r�get_viable_backendsz"KeyringBackend.get_viable_backendsFs!��
�h�)�(�3�3�S�\�B�B�Brc��|j�d��\}}}|�dd��}d�||jg��S)zr
        The keyring name, suitable for display.

        The name is derived from module and class name.
        �.�_� )r�
rpartition�replace�joinr)r�parent�sep�mod_names    rrzKeyringBackend.nameMsN��!$�� 9� 9�#� >� >����X��#�#�C��-�-���x�x��3�<�0�1�1�1rc�l�t|��}d�|j|j|j��S)Nz{}.{} (priority: {:g}))�type�formatrrr
)r'�
keyring_classs  r�__str__zKeyringBackend.__str__Xs5���T�
�
�
�'�.�.��$�m�&<�m�>T�
�
�	
r�service�username�returnc��dS)z,Get password of the username for the serviceNr)�r'rCrDs   r�get_passwordzKeyringBackend.get_password^s	���tr�passwordNc�*�tjd���)z�Set password for the username of the service.

        If the backend cannot store passwords, raise
        PasswordSetError.
        �reason)r�PasswordSetError�r'rCrDrIs    r�set_passwordzKeyringBackend.set_passwordcs���%�h�/�/�/rc�*�tjd���)z�Delete the password for the username of the service.

        If the backend cannot delete passwords, raise
        PasswordDeleteError.
        rK)r�PasswordDeleteErrorrGs   r�delete_passwordzKeyringBackend.delete_passwordos���(��2�2�2rc�d�|�-|�||��}|�tj||��SdS)aGets the username and password for the service.
        Returns a Credential instance.

        The *username* argument is optional and may be omitted by
        the caller or ignored by the backend. Callers must use the
        returned username.
        N)rHr�SimpleCredentialrMs    r�get_credentialzKeyringBackend.get_credentialzs=�����(�(��(�;�;�H��#�"�3�H�h�G�G�G��trc��d�}tdt|tj�������}|D]\}}t|||���dS)z6For all KEYRING_PROPERTY_* env var, set that property.c�n�|\}}|�d��\}}}|o|���|fS)N�KEYRING_PROPERTY_)�	partition�lower)�item�key�value�prer<rs      r�parsez5KeyringBackend.set_properties_from_env.<locals>.parse�s;���J�C�� �]�]�+>�?�?�N�C��d��0�D�J�J�L�L�%�0�0rN)r0�map�os�environ�items�setattr)r'r^�propsrr\s     rr&z&KeyringBackend.set_properties_from_env�sl��	1�	1�	1�
�t�S���
�(8�(8�(:�(:�;�;�<�<�� �	'�	'�K�D�%��D�$��&�&�&�&�	'�	'rc�r�tj|��}t|���|��|Sr%)�copy�vars�update)r'�kwargs�alts   r�with_propertieszKeyringBackend.with_properties�s.���i��o�o���S�	�	���� � � ��
r)rrrr rr
r	�
classpropertyr.�classmethodr3rrB�abc�abstractmethod�strrrHrNrQr�
CredentialrTr&rkr)rrr#r#'s���������'�'�'���� �������
�C�C��[�C���2�2���2�
�
�
�	���C��3��8�C�=�������	��0�C�0�3�0�#�0�$�0�0�0���0�3�s�3�c�3�d�3�3�3�3�����3�-��
�+�(�	)�	����&
'�
'�
'�����rr#)�	metaclassc�R�eZdZdZejd���Zejd���ZdS)�Crypterz.Base class providing encryption and decryptionc��dS)zEncrypt the value.Nr)�r'r\s  r�encryptzCrypter.encrypt��	��	
�rc��dS)zDecrypt the value.Nr)rvs  r�decryptzCrypter.decrypt�rxrN)rrrr rnrorwrzr)rrrtrt�sV������8�8���
�
���
�	��
�
���
�
�
rrtc��eZdZdZd�Zd�ZdS)�NullCrypterzA crypter that does nothingc��|Sr%r)rvs  rrwzNullCrypter.encrypt�����rc��|Sr%r)rvs  rrzzNullCrypter.decrypt�r~rN)rrrr rwrzr)rrr|r|�s8������%�%��������rr|c�.�tjd���D]~}	t�d|j��|���}t
|��r
|���Q#t$r!t�d|�d���Y�{wxYwdS)a�
    Locate all setuptools entry points by the name 'keyring backends'
    and initialize them.
    Any third-party library may register an entry point by adding the
    following to their setup.cfg::

        [options.entry_points]
        keyring.backends =
            plugin_name = mylib.mymodule:initialize_func

    `plugin_name` can be anything, and is only used to display the name
    of the plugin at initialization time.

    `initialize_func` is optional, but will be invoked if callable.
    zkeyring.backends)�groupz
Loading %szError initializing plugin r5N)	r�entry_points�log�debugr�load�callable�	Exception�	exception)�ep�	init_funcs  r�
_load_pluginsr��s��� �#�*<�=�=�=�>�>��	>��I�I�l�B�G�,�,�,����	�	�I��	�"�"�
��	�������	>�	>�	>��M�M�<�r�<�<�<�=�=�=�=�=�	>����
>�>s�A
A'�'(B�Bc��t��t���}tj|t
���}t
|��S)zc
    Return a list of all implemented keyrings that can be constructed without
    parameters.
    )�
exceptions)r�r#r3r�suppress_exceptions�	TypeError�list)�viable_classes�ringss  r�get_all_keyringr��s?���O�O�O�#�7�7�9�9�N��$�^�	�J�J�J�E���;�;�rc�d�eZdZdZdZeedd���edd������Zdd
�Zd	S)�SchemeSelectablea
    Allow a backend to select different "schemes" for the
    username and service.

    >>> backend = SchemeSelectable()
    >>> backend._query('contoso', 'alice')
    {'username': 'alice', 'service': 'contoso'}
    >>> backend._query('contoso')
    {'service': 'contoso'}
    >>> backend.scheme = 'KeePassXC'
    >>> backend._query('contoso', 'alice')
    {'UserName': 'alice', 'Title': 'contoso'}
    >>> backend._query('contoso', 'alice', foo='bar')
    {'UserName': 'alice', 'Title': 'contoso', 'foo': 'bar'}
    �defaultrDrC)rDrC�UserName�Title)r��	KeePassXCNc�x�|j|j}t|�|d||d|in	|d|ifi|��S)NrDrC)�schemes�schemer)r'rCrD�baser�s     r�_queryzSchemeSelectable._query�sj����d�k�*���
�#��z�"�H��y�!�7�
�
��y�!�7��

�

��

�

�
	
rr%)rrrr r�rr�r�r)rrr�r��ss�������� �F��d���j�)�<�<�<��$�
�G�<�<�<����G�

�
�
�
�
�
rr�)r r`rn�loggingr1rf�typingr�py310compatr�rrr�_compatr	�	getLoggerrr�r2�by_priority�_limit�ABCMetarr#rtr|r��oncer�r�r)rr�<module>r�s�����
�	�	�	�
�
�
�
�������������������!�!�!�!�!�!�'�'�'�'�'�'�'�'�'�'��������g���!�!��"�h�!�*�-�-��	
������������u�u�u�u�u�1�u�u�u�u�p
�
�
�
�
�
�
�
������'����>�>�>�4�������#
�#
�#
�#
�#
�#
�#
�#
�#
�#
r

Youez - 2016 - github.com/yon3zu
LinuXploit