+
    lhw                         R t ^ RIt^ RItRR.tR tR t ! R R]4      t ! R R4      t ! R	 R4      t	]
R
8X  d   ]! ]	! 4       4       R# R# )z-An object-oriented interface to .netrc files.NnetrcNetrcParseErrorc                  X    \         P                  R 8H  ;'       d    \        \         R4      # )posixgetuid)osnamehasattr     lib/python3.14/netrc.py_can_security_checkr   
   s     77g77'"h"77r   c                 t     ^ RI pVP                  V 4      ^ ,          #   \        \        3 d	    RT  2u # i ; i)    Nzuid )pwdgetpwuidImportErrorLookupError)uidr   s   & r   	_getpwuidr      s>    ||C ##% cU|s    77c                   4   a  ] tR t^t o RtRR ltR tRtV tR# )r   z5Exception raised on syntax errors in the .netrc file.Nc                T    W n         W0n        Wn        \        P	                  W4       R # N)filenamelinenomsg	Exception__init__)selfr   r   r   s   &&&&r   r   NetrcParseError.__init__   s     4%r   c                Z    V P                   : R V P                  : RV P                  : R2# )z (z, line ))r   r   r   )r   s   &r   __str__NetrcParseError.__str__   s    %)XXt}}dkkJJr   )r   r   r   )NN)	__name__
__module____qualname____firstlineno____doc__r   r"   __static_attributes____classdictcell____classdict__s   @r   r   r      s     ?&K Kr   c                   8   a  ] tR t^#t o R tR tR tR tRtV t	R# )	_netrclexc                <    ^V n         Wn        RV n        . V n        R# )   z
	 N)r   instream
whitespacepushback)r   fps   &&r   r   _netrclex.__init__$   s    #r   c                |    V P                   P                  ^4      pVR8X  d   V ;P                  ^,          un        V# )r0   
)r1   readr   )r   chs   & r   
_read_char_netrclex._read_char*   s0    ]]":KK1K	r   c                   V P                   '       d   V P                   P                  ^ 4      # Rp\        V P                  R4      pV F  pW0P                  9   d   K  VR8X  d8   V F/  pVR8X  d   Vu u # VR8X  d   V P                  4       pW,          pK1  	  KS  VR8X  d   V P                  4       pW,          pV F8  pW0P                  9   d   Vu u # VR8X  d   V P                  4       pW,          pK:  	  K  	  V# )r    "\)r3   popiterr:   r2   )r   tokenfiterr9   s   &   r   	get_token_netrclex.get_token0   s    =====$$Q''T__b)B__$SyBSy$t!__.KE   :*BB__,$t!__.KE   ( r   c                <    V P                   P                  V4       R # r   )r3   append)r   rB   s   &&r   
push_token_netrclex.push_tokenK   s    U#r   )r1   r   r3   r2   N)
r$   r%   r&   r'   r   r:   rD   rH   r)   r*   r+   s   @r   r.   r.   #   s     6$ $r   r.   c                   B   a  ] tR t^Ot o RR ltR tR tR tR tRt	V t
R# )	r   Nc                   VR J pVf>   \         P                  P                  \         P                  P                  R4      R4      p/ V n        / V n         \        VRR7      ;_uu_ 4       pV P                  WV4       R R R 4       R #   + '       g   i     R # ; i  \         dJ    \        TRR7      ;_uu_ 4       pT P                  YT4       R R R 4        R #   + '       g   i      R # ; ii ; i)N~z.netrczutf-8)encodinglocale)	r   pathjoin
expanduserhostsmacrosopen_parseUnicodeDecodeError)r   filedefault_netrcr4   s   &&  r   r   netrc.__init__P   s    <77<< 2 23 7BD
	5dW--Dm4 .---! 	5dX.."Dm4 /...	5sH   B *B=B B	B B  C/;CC/C+$C/+C/c                X   \        V4      p VP                  pVP                  4       ;rgV'       g   R# V^ ,          R8X  d>   VP                  V8X  d+   \        V4      ^8X  d   VP                  P                  4        Ks  VR8X  d   VP                  4       pMVR8X  d   RpMVR8X  d   VP                  4       p. V P                  V&    VP                  P                  4       p	V	'       g   \        RWP                  4      hV	R8X  d   M$V P                  V,          P                  V	4       Ke  EK#  \        RV,          WP                  4      hV'       g   \        RV,          WP                  4      hR	;p
;r/ V P                  V&    VP                  pVP                  4       pVP                  R4      '       d.   VP                  V8X  d   VP                  P                  4        Ka  VR9   d$   WV3V P                  V&   VP                  V4       MoVR
8X  g   VR8X  d   VP                  4       p
K  VR8X  d   VP                  4       pK  VR8X  d   VP                  4       pK  \        RV,          WP                  4      hV P                  W#V P                  V,          ^ ,          4       EK  )r0   #machinedefaultmacdefz.Macro definition missing null line terminator.r7   zbad toplevel token %rzmissing %r namer=   loginuseraccountpasswordzbad follower token %rN>   r=   r^   r]   r\   )r.   r   rD   lenr1   readlinerS   r   rG   rR   
startswithrH   _security_check)r   rW   r4   rX   lexersaved_linenotopleveltt	entrynameliner_   ra   rb   prev_linenos   &&&&          r   rU   netrc._parse]   s:   " <<L!OO--HA#<<</CGqLNN++-y!OO-	y%	x!OO-	)+I& >>224D-L ,,0 0 t| KK	*11$7%+b0$F F %&7"&<dLLQQ *,+E+G$&DJJy!#ll__&==%%||{2//1==-2X,FDJJy)$$R(7]bFl!OO-E9_#oo/G:%$0H)*AB*F*.> >  DJJy4I!4LMr   c                   \        4       '       d   V'       d   VR 8w  d   \        P                  ! VP                  4       4      p\        P                  ! 4       pVP
                  V8w  d3   \        VP
                  4      p\        V4      p\        RV RV R24      hVP                  \        P                  \        P                  ,          ,          '       d   \        R4      hR# R# R# R# )	anonymousz~/.netrc file owner (z, z) does not match current userzY~/.netrc access too permissive: access permissions must restrict access to only the ownerN)r   r   fstatfilenor   st_uidr   r   st_modestatS_IRWXGS_IRWXO)r   r4   rX   r_   propcurrent_user_idfownerr`   s   &&&&    r   rf   netrc._security_check   s      ]u7K88BIIK(D iikO{{o-"4;;/ 1%,VHBtf =% %' ' t|| ;<<%!" " = 8L] r   c                    WP                   9   d   V P                   V,          # RV P                   9   d   V P                   R,          # R# )z8Return a (user, account, password) tuple for given host.r]   N)rR   )r   hosts   &&r   authenticatorsnetrc.authenticators   s9    ::::d##$**$::i((r   c                   RpV P                   P                  4        Fd  pV P                   V,          pVRV RV^ ,           R2,          pV^,          '       d   VRV^,           R2,          pVRV^,           R2,          pKf  	  V P                  P                  4        F;  pVRV R2,          pV P                  V,           F  pW,          pK  	  VR,          pK=  	  V# )z3Dump the class data in the format of a .netrc file.r=   zmachine z
	login r7   z		account z
	password zmacdef )rR   keysrS   )r   repr}   attrsmacrorl   s   &     r   __repr__netrc.__repr__   s    JJOO%DJJt$EXdV:eAhZr::CQxxE!H:R00[q
"--C & [[%%'EWUG2&&CE** +4KC	 (
 
r   )rR   rS   r   )r$   r%   r&   r'   r   rU   rf   r~   r   r)   r*   r+   s   @r   r   r   O   s%     5>N@"  r   __main__)r(   r   ru   __all__r   r   r   r   r.   r   r$   printr
   r   r   <module>r      s`    3 %
&8
	Ki 	K)$ )$Xu un z	%'N r   