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/secretstorage/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/secretstorage/__pycache__/util.cpython-311.pyc
�

�bc���dZddlZddlmZmZmZddlmZmZm	Z	m
Z
mZmZm
Z
ddlmZddlmZmZmZmZmZmZmZmZmZmZddlmZmZddlmZm Z dd	l!m"Z"m#Z#m$Z$dd
l%m&Z&dZ'edzZ(ed
zZ)Gd�de��Z*dedefd�Z+dede,de-dee-e,e,e-ffd�Z.dede-dee/ee-ffd�Z0dedee-de/fd�Z1deddfd�Z2dS)zkThis module provides some utility functions, but these shouldn't
normally be used by external applications.�N)�Any�List�Tuple)�DBusAddress�DBusErrorResponse�	MatchRule�Message�MessageType�new_method_call�
Properties)�DBusConnection)
�DBUS_UNKNOWN_METHOD�DBUS_NO_SUCH_OBJECT�DBUS_SERVICE_UNKNOWN�
DBUS_NO_REPLY�DBUS_NOT_SUPPORTED�DBUS_EXEC_FAILED�SS_PATH�	SS_PREFIX�ALGORITHM_DH�ALGORITHM_PLAIN)�Session�int_to_bytes)�ItemNotFoundException�"SecretServiceNotAvailableException)�Cipher�
algorithms�modes)�default_backendzorg.freedesktop.secrets�Service�Promptc�z�eZdZdZdedededdfd�Zdedefd	�Z	d
edededefd
�Z
dedefd�Zdedededdfd�ZdS)�DBusAddressWrapperz�A wrapper class around :class:`jeepney.wrappers.DBusAddress`
    that adds some additional methods for calling and working with
    properties, and converts error responses to SecretStorage
    exceptions.

    .. versionadded:: 3.0
    �path�	interface�
connection�returnNc�L�tj||t|��||_dS�N)r�__init__�BUS_NAME�_connection)�selfr$r%r&s    �4/usr/lib/python3/dist-packages/secretstorage/util.pyr*zDBusAddressWrapper.__init__'s'����T�4��9�=�=�=�%������msgc��	|j�|��}|jjtjkrt
|���|jS#t$rz}|jttfvrtd��|�|jtttfvr4|j}t!|t"��r|d}t%|��|��d}~wwxYw)NzItem does not exist!r)r,�send_and_get_reply�header�message_typer
�errorr�body�namerrrrrr�data�
isinstance�tupler)r-r0�resp_msg�respr8s     r.r2z%DBusAddressWrapper.send_and_get_reply,s���	� $� 0� C� C�C� H� H�H���+�{�/@�@�@�'��1�1�1��=� �� �		�		�		��y�0�2E�F�F�F�+�,B�C�C��M���3�5E�,�.�.�.��y���d�E�*�*�#���7�D�8��>�>�D�H������		���s�A	A�
C�A5C�C�method�	signaturer6c�P�t||||��}|�|��Sr))rr2)r-r=r>r6r0s     r.�callzDBusAddressWrapper.call=s)���d�F�I�t�<�<���&�&�s�+�+�+r/r7c�~�t|���|��}|�|��\\}}|Sr))r�getr2)r-r7r0r>�values     r.�get_propertyzDBusAddressWrapper.get_propertyAs=������"�"�4�(�(��"�5�5�c�:�:����E��r/rCc�x�t|���|||��}|�|��dSr))r�setr2)r-r7r>rCr0s     r.�set_propertyzDBusAddressWrapper.set_propertyFs;������"�"�4��E�:�:������$�$�$�$�$r/)
�__name__�
__module__�__qualname__�__doc__�strr
r*r	rr2r@rDrG�r/r.r#r#s���������&�S�&�S�&�+�&�04�&�&�&�&�
�g��#�����",�3�,�3�,�s�,�s�,�,�,�,���������
%��%��%�S�%�T�%�%�%�%�%�%r/r#r&r'c	���ttt|��}t��}	|�ddt
dt
|j��f��\}}|\}}|dksJ�t�	|d��}|�
|��nO#t$rB}|jtkr�|�ddtd��\}}d|_Yd}~nd}~wwxYw||_|S)z%Returns a new Secret Service session.�OpenSession�sv�ay�big)�s�FN)r#r�
SERVICE_IFACErr@rr�
my_public_key�int�
from_bytes�set_server_public_keyrr7rr�	encrypted�object_path)	r&�service�session�output�resultr>rC�keyr<s	         r.�open_sessionraKs�� ��-��D�D�G��i�i�G�+� ����4��
�<�� 5�6�6�7�9�9����"��	�5��D� � � � ��n�n�U�E�*�*���%�%�c�*�*�*�*���"�"�"��9�*�*�*�� ����4��������"������������"����!�G���Ns�4B�
C)�'8C$�$C)r]�secret�content_typec��t|t��r|�d��}n$t|t��st	d���|j�J�|js|jd||fS|j�J�dt|��dzz
}|t|f|z��z
}tj
d��}tj|j��}t|tj|��t!�������}|�|��|���z}|j|||fS)zKFormats `secret` to make possible to pass it to the
    Secret Service API.zutf-8zsecret must be bytesNr/��)r9rL�encode�bytes�	TypeErrorr[rZ�aes_key�len�os�urandomr�AESrr�CBCr�	encryptor�update�finalize)r]rbrc�padding�aes_iv�aesrp�encrypted_secrets        r.�
format_secretrwes>���&�#���0����w�'�'���
���
&�
&�0��.�/�/�/���*�*�*���@��#�S�&�,�?�?��?�&�&�&��c�&�k�k�C�'�(�G�
�e�W�J��(�)�)�)�F�
�Z��
�
�F�
�.���
)�
)�C��s�E�I�f�-�-��/@�/@�A�A�K�K�M�M�I� �'�'��/�/�)�2D�2D�2F�2F�F�������	�r/�prompt_pathc�L�t|t|��}t|tdtj���}|�|��5}|�ddd��|�|��j\}}ddd��n#1swxYwY|�J�|�J�||fS)z�Executes the prompt in a blocking mode.

    :returns: a tuple; the first element is a boolean value showing
              whether the operation was dismissed, the second element
              is a list of unlocked object paths
    �	Completed)r$r%�member�typer!rSrTN)	r#�PROMPT_IFACErr
�signal�filterr@�recv_until_filteredr6)r&rx�prompt�rule�signals�	dismissedr_s       r.�exec_promptr��s�� ��\�:�
F�
F�F��
���
�
�	���D�
�	�	�4�	 �	 �I�G����H�c�2�&�&�&�&�:�:�7�C�C�H��	�6�I�I�I�I�I�I�I�I�I�I�I����I�I�I�I�� � � ������f��s�5B�B�B�pathsc���ttt|��}|�dd|��\}}t	|��dkr t||��\}\}}|dksJ�|SdS)z�Requests unlocking objects specified in `paths`.
    Returns a boolean representing whether the operation was dismissed.

    .. versionadded:: 2.1.2�Unlock�ao�F)r#rrUr@rkr�)r&r�r\�unlocked_pathsr�r�r>�unlockeds        r.�unlock_objectsr��ss��
!��-��D�D�G�$�\�\�(�D�%�@�@��N�F�
�6�{�{�Q���+6�z�6�+J�+J�(�	�(�I�x��D� � � � ����5r/c��ttt���}tdd|���}d|_|�dd|�����dS)z�Adds match rules for the given connection.

    Currently it matches all messages from the Prompt interface, as the
    mock service (unlike GNOME Keyring) does not specify the signal
    destination.

    .. versionadded:: 3.1
    )�senderr%z/org/freedesktop/DBuszorg.freedesktop.DBus)r$r%r&�AddMatchrSN)rr+r}r#�bus_namer@�	serialise)r&r��dbuss   r.�add_match_rulesr��sb���H��=�=�=�D��#:�(>�)3�5�5�5�D�+�D�M��I�I�j�#�t�~�~�/�/�0�0�0�0�0r/)3rKrl�typingrrr�jeepneyrrrr	r
rr�jeepney.io.blockingr
�secretstorage.definesrrrrrrrrrr�secretstorage.dhcryptorr�secretstorage.exceptionsrr�&cryptography.hazmat.primitives.ciphersrrr�cryptography.hazmat.backendsrr+rUr}r#rarhrLrw�boolr�r�r�rMr/r.�<module>r�s���.�.�
�	�	�	�#�#�#�#�#�#�#�#�#�#�������������������/�.�.�.�.�.�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�9�8�8�8�8�8�8�8�$�$�$�$�$�$�$�$�L�L�L�L�L�L�L�L�L�L�8�8�8�8�8�8�$���I�%�
��8�#��)%�)%�)%�)%�)%��)%�)%�)%�X�^�������4�7��E�� #��(-�c�5�%��.D�(E�����6�N�� ��%*�4��c��?�%;�����.�~��d�3�i��D�����1��1�4�1�1�1�1�1�1r/

Youez - 2016 - github.com/yon3zu
LinuXploit