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/jeepney/io/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/jeepney/io/__pycache__/asyncio.cpython-311.pyc
�

+�c����ddlZddlZddlmZddlmZddlmZmZddl	m
Z
ddlmZm
Z
mZddlmZmZddlmZd	d
lmZmZmZmZmZGd�d��Zdd�ZGd�d��ZGd�d��ZGd�de��ZdS)�N)�count)�Optional)�
Authenticator�BEGIN)�get_bus)�Message�MessageType�Parser)�	ProxyBase�
unwrap_msg)�message_bus�)�MessageFilters�FilterHandle�ReplyMatcher�RouterClosed�check_replyablec�f�eZdZdZdejdejfd�Zdd�defd�Z	d	efd
�Z
d�Zd�Zd
�Z
dS)�DBusConnectionaPA plain D-Bus connection with no matching of replies.

    This doesn't run any separate tasks: sending and receiving are done in
    the task that calls those methods. It's suitable for implementing servers:
    several worker tasks can receive requests and send replies.
    For a typical client pattern, see :class:`DBusRouter`.
    �reader�writerc��||_||_t��|_t	d���|_d|_tj��|_	dS)Nr)�start)
rrr
�parserr�outgoing_serial�unique_name�asyncio�Lock�	send_lock)�selfrrs   �4/usr/lib/python3/dist-packages/jeepney/io/asyncio.py�__init__zDBusConnection.__init__sD���������h�h���$�1�~�~�~������ ��������N��serial�messagec��2K�|j4�d{V��|�t|j��}|j�|�|����|j����d{V��ddd���d{V��dS#1�d{V��swxYwYdS)z.Serialise and send a :class:`~.Message` objectN)r�nextrr�write�	serialise�drain�r r&r%s   r!�sendzDBusConnection.send s+�����>�	&�	&�	&�	&�	&�	&�	&�	&��~��d�2�3�3���K���g�/�/��7�7�8�8�8��+�#�#�%�%�%�%�%�%�%�%�%�		&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&�	&����	&�	&�	&�	&�	&�	&s�A#B�
B�B�returnc���K�	|j���}|�|S|j�d���d{V��}|st�|j�|���a)z5Return the next available message from the connectionTNi)r�get_next_messager�read�EOFError�add_data)r �msg�bs   r!�receivezDBusConnection.receive(sw����	$��+�.�.�0�0�C����
��k�&�&�t�,�,�,�,�,�,�,�,�A��
����K� � ��#�#�#�	$r#c��zK�|j���|j����d{V��dS)zClose the D-Bus connectionN)r�close�wait_closed�r s r!r8zDBusConnection.close4sF������������k�%�%�'�'�'�'�'�'�'�'�'�'�'r#c��
K�|S�N�r:s r!�
__aenter__zDBusConnection.__aenter__9������r#c��>K�|����d{V��dSr<)r8�r �exc_type�exc_val�exc_tbs    r!�	__aexit__zDBusConnection.__aexit__<s,�����j�j�l�l���������r#)�__name__�
__module__�__qualname__�__doc__r�StreamReader�StreamWriterr"rr-r6r8r>rEr=r#r!rrs���������(�w�3�(�W�=Q�(�(�(�(�6:�&�&�&�'�&�&�&�&�
$�w�
$�
$�
$�
$�(�(�(�
�������r#r�SESSIONc��K�t|��}tj|���d{V��\}}t��}|D]r}|�|��|����d{V��|�d���d{V��}|std���|�|���s|�t��|����d{V��t||��}t|��4�d{V��}tjtt|�����d���d{V��}	|	d|_ddd���d{V��n#1�d{V��swxYwY|S)zHOpen a plain D-Bus connection

    :return: :class:`DBusConnection`
    Niz#Socket closed before authentication�
r)rr�open_unix_connectionrr)r+r1r2�feedrr�
DBusRouter�wait_for�Proxyr
�Hellor)
�bus�bus_addrrr�authr�req_datar5�conn�router�
reply_bodys
          r!�open_dbus_connectionr\@s����
�s�|�|�H�"�7��A�A�A�A�A�A�A�A�N�F�F�
�O�O�E��������X�����l�l�n�n���������+�+�d�#�#�#�#�#�#�#�#���	B��@�A�A�A�
�
�
�1�
�
�
�
�
�L�L�����
�,�,�.�.���������&�&�)�)�D��$���)�)�)�)�)�)�)�6�"�+�E�+�v�,F�,F�,L�,L�,N�,N�PR�S�S�S�S�S�S�S�S�
�%�a�=���)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)�)����)�)�)�)��Ks�AE+�+
E5�8E5c��eZdZdZdZdZdZdefd�Ze	d���Z
dd�d�Zdefd	�Z
dd
d�deejfd
�Zd�Zd�Zdefd�Zd�ZdS)rQz�A 'client' D-Bus connection which can wait for a specific reply.

    This runs a background receiver task, and makes it possible to send a
    request and wait for the relevant reply.
    NrYc��||_t��|_t��|_tj|�����|_dSr<)	�_connr�_repliesr�_filtersr�create_task�	_receiver�	_rcv_task)r rYs  r!r"zDBusRouter.__init__jsA����
�$����
�&�(�(��
� �,�T�^�^�-=�-=�>�>����r#c��|jjSr<)r_rr:s r!rzDBusRouter.unique_nameps
���z�%�%r#r$c��NK�|j�||����d{V��dS)z&Send a message, don't wait for a replyr$N)r_r-r,s   r!r-zDBusRouter.sendts6�����j�o�o�g�f�o�5�5�5�5�5�5�5�5�5�5�5r#r.c��|K�t|��|j���rtd���t	|jj��}|j�|tj
����5}|�||����d{V��|�d{V��cddd��S#1swxYwYdS)z�Send a method call message and wait for the reply

        Returns the reply message (method return or error message type).
        zThis DBusRouter has stoppedr$N)rrd�donerr(r_rr`�catchr�Futurer-)r r&r%�	reply_futs    r!�send_and_get_replyzDBusRouter.send_and_get_replyxs����
	�� � � ��>��� � �	>��<�=�=�=��d�j�0�1�1��
�]�
 �
 ����)9�)9�
:�
:�	%�i��)�)�G�F�)�3�3�3�3�3�3�3�3�3�#�O�O�O�O�O�O�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%����	%�	%�	%�	%�	%�	%s�?%B1�1B5�8B5r)�queue�bufsizermc�V�t|j||ptj|����S)arCreate a filter for incoming messages

        Usage::

            with router.filter(rule) as queue:
                matching_msg = await queue.get()

        :param MatchRule rule: Catch messages matching this rule
        :param asyncio.Queue queue: Send matching messages here
        :param int bufsize: If no queue is passed in, create one with this size
        )rrar�Queue)r �rulermrns    r!�filterzDBusRouter.filter�s'���D�M�4��1P�'�-��:P�:P�Q�Q�Qr#c��
K�|Sr<r=r:s r!r>zDBusRouter.__aenter__�r?r#c��(K�|j���r|j���n\|j���t	jtj��5|j�d{V��ddd��n#1swxYwYdS)NF)rdrh�result�cancel�
contextlib�suppressr�CancelledErrorrAs    r!rEzDBusRouter.__aexit__�s������>��� � �	%��N�!�!�#�#�#�#��N�!�!�#�#�#��$�W�%;�<�<�
%�
%��n�$�$�$�$�$�$�$�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%�
%����
%�
%�
%�
%��us�-B�B�Br4c���|j�|��rdSt|j�|����D]2}	|j�|���#tj$rY�/wxYwdS)zHandle one received messageN)	r`�dispatch�listra�matchesrm�
put_nowaitr�	QueueFull)r r4rrs   r!�	_dispatchzDBusRouter._dispatch�s����=�!�!�#�&�&�	��F��4�=�0�0��5�5�6�6�	�	�F�
���'�'��,�,�,�,���$�
�
�
���
����	�	s�A"�"A4�3A4c��K�		|j����d{V��}|�|���5#|j���wxYw)z'Receiver loop - runs in a separate taskTN)r_r6r�r`�drop_all)r r4s  r!rczDBusRouter._receiver�si����	%�
$� �J�.�.�0�0�0�0�0�0�0�0�����s�#�#�#�
$��

�M�"�"�$�$�$�$���s	�6:�A)rFrGrHrI�_nursery_mgr�_send_cancel_scope�_rcv_cancel_scoperr"�propertyrr-rrlrrrprrr>rEr�rcr=r#r!rQrQ`s#��������
�L�����?�^�?�?�?�?��&�&��X�&�-1�6�6�6�6�6�
%�7�
%�
%�
%�
%�?C�A�R�R�R�X�g�m�%<�R�R�R�R�������	�W�	�	�	�	�%�%�%�%�%r#rQc�.�eZdZdZdZdZdd�Zd�Zd�ZdS)�open_dbus_routerz�Open a D-Bus 'router' to send and receive messages

    Use as an async context manager::

        async with open_dbus_router() as router:
            ...
    NrLc��||_dSr<)rU)r rUs  r!r"zopen_dbus_router.__init__�s
������r#c��K�t|j���d{V��|_t|j��|_|j����d{V��Sr<)r\rUrYrQ�req_ctxr>r:s r!r>zopen_dbus_router.__aenter__�s`����.�t�x�8�8�8�8�8�8�8�8��	�!�$�)�,�,����\�,�,�.�.�.�.�.�.�.�.�.r#c��K�|j�|||���d{V��|j����d{V��dSr<)r�rErYr8rAs    r!rEzopen_dbus_router.__aexit__�s\�����l�$�$�X�w��?�?�?�?�?�?�?�?�?��i�o�o�����������r#�rL)	rFrGrHrIrYr�r"r>rEr=r#r!r�r��s\���������D��G�����/�/�/�
 � � � � r#r�c�.��eZdZdZ�fd�Zd�Zd�Z�xZS)rSa�An asyncio proxy for calling D-Bus methods

    You can call methods on the proxy object, such as ``await bus_proxy.Hello()``
    to make a method call over D-Bus and wait for a reply. It will either
    return a tuple of returned data, or raise :exc:`.DBusErrorResponse`.
    The methods available are defined by the message generator you wrap.

    :param msggen: A message generator object.
    :param ~asyncio.DBusRouter router: Router to send and receive messages.
    c�X��t���|��||_dSr<)�superr"�_router)r �msggenrZ�	__class__s   �r!r"zProxy.__init__�s&���
������ � � �����r#c�B�d�|j|j��S)Nz
Proxy({}, {}))�format�_msggenr�r:s r!�__repr__zProxy.__repr__�s���%�%�d�l�D�L�A�A�Ar#c������fd�}|S)Nc���K��|i|��}|jjtjusJ��j�|���d{V��}t
|��Sr<)�header�message_typer	�method_callr�rlr)�args�kwargsr4�reply�make_msgr s    ��r!�innerz!Proxy._method_call.<locals>.inner�si������(�D�+�F�+�+�C��:�*�k�.E�E�E�E�E��,�9�9�#�>�>�>�>�>�>�>�>�E��e�$�$�$r#r=)r r�r�s`` r!�_method_callzProxy._method_call�s)����	%�	%�	%�	%�	%�	%��r#)rFrGrHrIr"r�r��
__classcell__)r�s@r!rSrS�sc�������	�	������B�B�B�������r#rSr�)rrw�	itertoolsr�typingr�jeepney.authrr�jeepney.busr�jeepneyrr	r
�jeepney.wrappersrr�jeepney.bus_messagesr
�commonrrrrrrr\rQr�rSr=r#r!�<module>r�s�����������������������-�-�-�-�-�-�-�-�������0�0�0�0�0�0�0�0�0�0�2�2�2�2�2�2�2�2�,�,�,�,�,�,���������������
-�-�-�-�-�-�-�-�`����@V%�V%�V%�V%�V%�V%�V%�V%�p � � � � � � � �0�����I�����r#

Youez - 2016 - github.com/yon3zu
LinuXploit