
    ^hk                         S SK r S SKrS SKJrJr  \R
                  r\R                  r\R                  rSr " S S5      r	g)    N)Xerror   c                   6    \ rS rSrSS jrS rS r S	S jrSrg)

Xauthority   Nc                    Uc  [         R                  R                  S5      nUc2   [         R                  R	                  [         R                  S   S5      n [        US5      R                  5       n/ U l        Sn U[        U5      :  Ga  [        R                  " SX$US	-    5      u  nUS	-   n[        R                  " SX$US	-    5      u  nXF-   S	-   nX$U-
  U n[        R                  " SX$US	-    5      u  nXF-   S	-   nX$U-
  U n[        R                  " SX$US	-    5      u  nXF-   S	-   nX$U-
  U n	[        R                  " SX$US	-    5      u  nXF-   S	-   nX$U-
  U n
[        U
5      U:w  a  O0U R                  R                  XWXU
45        U[        U5      :  a  GM  [        U R                  5      S:X  a  [!        S5        g g ! [
         a    [        R                  " S5      ef = f! [         a  n[        R                  " SU-  5      eS nAff = f! [        R                   a  n[!        S
U-  5         S nANS nAff = f)N
XAUTHORITYHOMEz.Xauthorityz($HOME not set, cannot find ~/.Xauthorityrbz~/.Xauthority: %sr   z>H   z_Xlib.xauth: warning, failed to parse part of xauthority file (%s), aborting all further parsingz4Xlib.xauth: warning, no xauthority details available)osenvirongetpathjoinKeyErrorr   
XauthErroropenreadOSErrorentrieslenstructunpackappendprint)selffilenamerawerrnfamilylengthaddrnumnamedataes               </var/www/html/env/lib/python3.13/site-packages/Xlib/xauth.py__init__Xauthority.__init__   sA   zz~~l3H@77<<

6(:MJ
	>x&++-C  	@c#h, --cAaCj9E --cAaCj9JNv:* --cAaCj9JNf*q) --cAaCj9JNv:* --cAaCj9JNv:*t9&##V3d$EF/ c#h,6 t||!HI "g  @&&>@ @@  	>""#6#<==	>T || 	@sv~~	@sB   1G G* =C2H 0-H !G'*
H4HHI)H<<Ic                 ,    [        U R                  5      $ N)r   r   )r   s    r*   __len__Xauthority.__len__]   s    4<<      c                      U R                   U   $ r.   r   )r   is     r*   __getitem__Xauthority.__getitem__`   s    ||Ar1   c                 *   [        U5      R                  5       nUR                  5       n0 nU R                   H   u  pxpnXq:X  d  M  X:X  d  M  XY:X  d  M  XU
'   M"     U H
  n XU   4s  $    [        R
                  " XU45      e! [         a     M3  f = f)a(  Find an authentication entry matching FAMILY, ADDRESS and
DISPNO.

The name of the auth scheme must match one of the names in
TYPES.  If several entries match, the first scheme in TYPES
will be choosen.

If an entry is found, the tuple (name, data) is returned,
otherwise XNoAuthError is raised.
)strencoder   r   r   XNoAuthError)r   r#   addressdispnotypesr&   matchesefameaddrenumenameedatats                r*   get_best_authXauthority.get_best_authc   s     &k  ".."/3||+De~%"2s{!& 0< A1:&    &6!:;;  s   "B
BBr3   r.   ))s   MIT-MAGIC-COOKIE-1)	__name__
__module____qualname____firstlineno__r+   r/   r5   rE   __static_attributes__ r1   r*   r   r      s    ;J|! 9<r1   r   )
r   r   Xlibr   r   FamilyInternetFamilyDECnetFamilyChaosFamilyLocalr   rL   r1   r*   <module>rR      s>   ( 
  !!~~mmb< b<r1   