Hacked By AnonymousFox
�
�܋f� � �P � d Z ddlZddlZddlZ G d� de� � Zd� Zd� Zd� ZdS )zUtility functions for xauth.� Nc � � e Zd ZdZdS )�
NotFoundErrorzError when xauth was not found.N)�__name__�
__module__�__qualname__�__doc__� � �g/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pyvirtualdisplay/xauth.pyr r s � � � � � �)�)�)�)r
r c � � t j ddgt j t j �� � } | � � � \ }}dS # t $ r Y dS w xY w)z3
Return whether or not xauth is installed.
�xauthz-V��stdout�stderrTF)�
subprocess�Popen�PIPE�communicate�FileNotFoundError)r
�_s r �is_installedr sq � ��� �
�d�O��?��?�
�
�
�� � � �"�"���1� �t�� � � � ��u�u����s �AA �
A�Ac �v � t j d� � } t j | � � � � � S )z6
Generate a cookie string suitable for xauth.
� )�os�urandom�hashlib�md5� hexdigest)�datas r �generate_mcookier ! s- � � �:�b�>�>�D��;�t���&�&�(�(�(r
c � � t j dgt | � � z t j t j �� � }|� � � \ }}dS )z)
Call xauth with the given args.
r
r N)r r �listr r )�argsr
r s r �callr$ ) sP � �
�� � �D��J�J������
�
�
�E� �����D�A�q�q�qr
) r r r r � Exceptionr r r r$ r r
r �<module>r&