文件操作 - xauth.cpython-311.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/Xlib/__pycache__/xauth.cpython-311.pyc
编辑文件内容
� J9�c� � � � d dl Z d dlZd dlmZmZ ej Zej Zej Zej Zej Z dZ G d� de� � ZdS )� N)�X�error� c �, � e Zd Zdd�Zd� Zd� Z dd�ZdS ) � XauthorityNc �v � |�t j � d� � }|�T t j � t j d d� � }n"# t $ r t j d� � �w xY w t |d� � 5 }|� � � }d d d � � n# 1 swxY w Y n:# t $ r-}t j d� ||� � � � �d }~ww xY wg | _ d} |t |� � k �rJt j d|||d z � � � \ }|d z }t j d|||d z � � � \ }||z d z }|||z |� }t j d|||d z � � � \ }||z d z }|||z |� } t j d|||d z � � � \ }||z d z }|||z |� } t j d|||d z � � � \ }||z d z }|||z |� }t |� � |k rn3| j � ||| | |f� � |t |� � k ��Jn7# t j $ r% t# d � |� � � � Y nw xY wt | j � � dk rt# d� � d S d S )N� XAUTHORITY�HOMEz.Xauthorityz($HOME not set, cannot find ~/.Xauthority�rbzcould not read from {0}: {1}r z>H� z^Xlib.xauth: warning, failed to parse part of xauthority file {0}, aborting all further parsingz4Xlib.xauth: warning, no xauthority details available)�os�environ�get�path�join�KeyErrorr � XauthError�open�read�IOError�format�entries�len�struct�unpack�append�print)�self�filename�fp�raw�err�n�family�length�addr�num�name�datas �,/usr/lib/python3/dist-packages/Xlib/xauth.py�__init__zXauthority.__init__# s[ � ����z�~�~�l�3�3�H��� @��7�<�<�� �6�(:�M�J�J����� @� @� @��&�>�@� @� @� @���� Y��h��%�%� ���g�g�i�i�� � � � � � � � � � � ���� � � � ���� Y� Y� Y��"�#A�#H�#H��SV�#W�#W�X�X�X����� Y���� ��� �� E��c�#�h�h�,�,� �-��c�!�A�a�C�%�j�9�9�����E�� �-��c�!�A�a�C�%�j�9�9�����J��N���1�v�:��>�*�� �-��c�!�A�a�C�%�j�9�9�����J��N���!�f�*�q�.�)�� �-��c�!�A�a�C�%�j�9�9�����J��N���1�v�:��>�*�� �-��c�!�A�a�C�%�j�9�9�����J��N���1�v�:��>�*���t�9�9��&�&����#�#�V�T�3��d�$C�D�D�D�/ �c�#�h�h�,�,���0 �|� E� E� E��r�y�y� {C� D� D� E� E� E� E� E� E���� �t�|����!�!��H�I�I�I�I�I� "�!sZ �0A �A5�9B6 � B*�B6 �*B.�.B6 �1B.�2B6 �6 C-� (C(�(C-�:EI �1J �J c �* � t | j � � S �N)r r )r s r* �__len__zXauthority.__len__b s � ��4�<� � � � c � � | j | S r- )r )r �is r* �__getitem__zXauthority.__getitem__e s � ��|�A��r/ �s MIT-MAGIC-COOKIE-1c � � t |� � � � � }i }| j D ]+\ }}} } }| dk r| |vr|} ||k r||k r|| k r||| <