Your IP : 3.144.109.147


Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/netrc.cpython-310.opt-2.pyc

o

6��fs�@sZ	ddlZddlZddlZddgZGdd�de�ZGdd�d�Zedkr+ee��dSdS)�N�netrc�NetrcParseErrorc@s eZdZ	ddd�Zdd�ZdS)rNcCs"||_||_||_t�||�dS�N)�filename�lineno�msg�	Exception�__init__)�selfrrr�r�,/opt/alt/python310/lib64/python3.10/netrc.pyr	szNetrcParseError.__init__cCsd|j|j|jfS)Nz%s (%s, line %s))rrr)r
rrr�__str__szNetrcParseError.__str__)NN)�__name__�
__module__�__qualname__r	r
rrrrr
s
c@s.eZdZd
dd�Zdd�Zdd�Zdd	�ZdS)rNcCs�|du}|durtj�tj�d�d�}i|_i|_z"t|dd��}|�|||�Wd�WdS1s4wYWdStydt|dd��}|�|||�Wd�YdS1s\wYYdSw)N�~z.netrczutf-8)�encoding�locale)	�os�path�join�
expanduser�hosts�macros�open�_parse�UnicodeDecodeError)r
�file�
default_netrc�fprrrr	s&�&��znetrc.__init__cCs�t�|�}|jd7_|j�dd�|_	|j}|��}}|s"dS|ddkr9|j|kr8t|�dkr8|j��q|dkrB|��}n:|dkrId}n3|dkrs|��}g|j	|<d	|_
	|j��}	|	re|	d
krid|_
n	|j	|�|	�qZqtd|||j��d}
d}}i|j
|<	|��}|�d�s�|d
vr�|r�|
||f|j
|<|�|�n�td||t|�f||j��|dks�|dkr�|��}
n�|dkr�|��}n�|dk�rAtjdk�r<|�r<t�|���}
|
jt��k�r+ddl}z
|�|
j�d}Wnt�yd|
j}Ynwz|�t���d}Wnt�ydt��}Ynwtd||f||j��|
jtjtjB@�r<td||j��|��}n	td|||j��q�q)Nz !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~�#��r�machine�default�macdefz 	�
z 	
zbad toplevel token %r>r!r#r$r%z&malformed %s entry %s terminated by %s�login�user�account�password�posixzuid %sz9~/.netrc file owner (%s) does not match current user (%s)zY~/.netrc access too permissive: access permissions must restrict access to only the ownerzbad follower token %r)�shlexZ	wordcharsZ
commenters�replacerZ	get_token�lenZinstream�readlinerZ
whitespace�appendrr�
startswithZ
push_token�reprr�name�fstat�fileno�st_uid�getuid�pwd�getpwuid�KeyError�st_mode�stat�S_IRWXG�S_IRWXO)r
rrrZlexerZsaved_linenoZtoplevelZttZ	entryname�liner'r)r*Zpropr8Zfownerr(rrrr$s�




��


��


�����
���znetrc._parsecCs.	||jvr|j|Sd|jvr|jdSdS)Nr$)r)r
�hostrrr�authenticatorsus



znetrc.authenticatorscCs�	d}|j��D],}|j|}|d|�d|d�d�7}|dr*|d|d�d�7}|d|d	�d�7}q|j��D]}|d
|�d�7}|j|D]}||7}qI|d7}q:|S)Nr!zmachine z
	login rr&r"z		account z
	password �zmacdef )r�keysr)r
Zrepr@ZattrsZmacror?rrr�__repr__~s


znetrc.__repr__r)rrrr	rrArDrrrrrs


Q	�__main__)	rr,r<�__all__rrrr�printrrrr�<module>sx�

?>