Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/keyring/backends/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/keyring/backends/__pycache__/SecretService.cpython-310.pyc
o

���a��@s�ddlmZddlZddlmZddlmZddlmZddl	m
Z
mZmZm
Z
zddlZddlmZWney=Yn	eyEYnwe�e�ZGdd	�d	e�ZdS)
�)�closingN�)�
properties)�KeyringBackend)�SimpleCredential)�	InitError�PasswordDeleteError�ExceptionRaisedContext�
KeyringLockedc@sVeZdZdZdZejedd���Zdd�Z	dd�Z
d	d
�Zdd�Zd
d�Z
dd�ZdS)�KeyringzSecret Service KeyringzPython keyring libraryc
Cs�t��}tjWd�n1swY|rtd��tjdkr%td��z$tt����}t�|�s6td��Wd�WdS1sBwYWdStj	y\}ztd|��d}~ww)NzSecretStorage required)�rz#SecretStorage 3.2 or newer requiredzJThe Secret Service daemon is neither running nor activatable through D-Busz&Unable to initialize SecretService: %s�)
r	�
secretstorage�__name__�RuntimeError�__version_tuple__r�	dbus_init�check_service_availability�
exceptions�SecretStorageException)�cls�exc�
connection�e�r�@/usr/lib/python3/dist-packages/keyring/backends/SecretService.py�prioritys,�

�������zKeyring.priorityc
Cs|t��}zt|d�rt�||j�}nt�|�}Wntjy+}ztd|��d}~ww|�	�r<|�
�|�	�r<td��|S)z�If self.preferred_collection contains a D-Bus path,
        the collection at that address is returned. Otherwise,
        the default collection is returned.
        �preferred_collectionz$Failed to create the collection: %s.Nz Failed to unlock the collection!)rr�hasattr�
Collectionr�get_default_collectionrrr�	is_locked�unlockr
)�self�bus�
collectionrrrr�get_preferred_collection3s

���z Keyring.get_preferred_collectioncCs&t|d�r	|��|��rtd��dS)Nr"zFailed to unlock the item!)rr"r!r
)r#�itemrrrr"Fs

�zKeyring.unlockcCsz|��}t|j��*|�||d��}|D]}|�|�|���d�Wd�SWd�dS1s6wYdS)z,Get password of the username for the service��username�service�utf-8N)r&rr�search_itemsr"�
get_secret�decode�r#r*r)r%�itemsr'rrr�get_passwordLs
�"�zKeyring.get_passwordcCsd|��}|j||d�}d�||�}t|j��|j|||dd�Wd�dS1s+wYdS)z,Set password for the username of the service)�applicationr*r)zPassword for '{}' on '{}'T)�replaceN)r&�appid�formatrr�create_item)r#r*r)�passwordr%�
attributes�labelrrr�set_passwordUs�"�zKeyring.set_passwordcCsr|��}t|j��$|�||d��}|D]}|��Wd�SWd�td��1s0wYtd��)z/Delete the stored password (only the first one)r(NzNo such password!)r&rrr,�deleterr/rrr�delete_passwordas
�
��zKeyring.delete_passwordcCs�d|i}|r
||d<|��}t|j��1|�|�}|D] }|�|�|���d�}t||���	d��Wd�SWd�dS1sGwYdS)aYGets the first username and password for a service.
        Returns a Credential instance

        The username can be omitted, but if there is one, it will use get_password
        and return a SimpleCredential containing  the username and password
        Otherwise, it will return the first username and password combo that it finds.
        r*r)r+N)
r&rrr,r"�get_attributes�getrr-r.)r#r*r)�queryr%r0r'rrr�get_credentialjs	

�"�zKeyring.get_credentialN)r�
__module__�__qualname__�__doc__r4r�
ClassProperty�classmethodrr&r"r1r:r<r@rrrrrs		r)�
contextlibr�logging�utilr�backendr�credentialsr�errorsrrr	r
r�secretstorage.exceptionsr�ImportError�AttributeError�	getLoggerr�logrrrrr�<module>s �


Spamworldpro Mini