ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python311/lib64/python3.11/__pycache__/netrc.cpython-311.pyc

�

�f���dZddlZddlZddlZddgZGd�de��ZGd�d��ZGd�d��Ze	d	kre
e����dSdS)
z-An object-oriented interface to .netrc files.�N�netrc�NetrcParseErrorc� �eZdZdZdd�Zd�ZdS)rz5Exception raised on syntax errors in the .netrc file.Nc�f�||_||_||_t�||��dS�N)�filename�lineno�msg�	Exception�__init__)�selfr
rr	s    �,/opt/alt/python311/lib64/python3.11/netrc.pyrzNetrcParseError.__init__s3�� ��
����������4��%�%�%�%�%�c�6�|j�d|j�d|j�d�S)Nz (z, line �))r
rr	)r
s r�__str__zNetrcParseError.__str__s!��%)�X�X�X�t�}�}�}�d�k�k�k�J�Jr)NN)�__name__�
__module__�__qualname__�__doc__rr�rrrr
sB������?�?�&�&�&�&�K�K�K�K�Krc�&�eZdZd�Zd�Zd�Zd�ZdS)�	_netrclexc�>�d|_||_d|_g|_dS)N�z
	
 )r	�instream�
whitespace�pushback)r
�fps  rrz_netrclex.__init__s"�������
�#�����
�
�
rc�f�|j�d��}|dkr|xjdz
c_|S)Nr�
)r�readr	)r
�chs  r�
_read_charz_netrclex._read_chars5��
�]�
�
��
"�
"��
��:�:��K�K�1��K�K��	rc��|jr|j�d��Sd}t|jd��}|D]�}||jvr�|dkr1|D]-}|dkr|ccS|dkr|���}||z
}�.�C|dkr|���}||z
}|D]0}||jvr|ccS|dkr|���}||z
}�1��|S)Nr��"�\)r�pop�iterr$r)r
�token�fiterr#s    r�	get_tokenz_netrclex.get_token#s(���=�	(��=�$�$�Q�'�'�'����T�_�b�)�)���	 �	 �B��T�_�$�$���S�y�y�� � �B��S�y�y�$�������t���!�_�_�.�.���R�K�E�E� ���:�:����*�*�B������ � �B��T�_�,�,�$�������t���!�_�_�.�.���R�K�E�E� ��rc�:�|j�|��dSr)r�append)r
r+s  r�
push_tokenz_netrclex.push_token>s���
���U�#�#�#�#�#rN)rrrrr$r-r0rrrrrsP���������������6$�$�$�$�$rrc�.�eZdZdd�Zd�Zd�Zd�Zd�ZdS)rNc���|du}|�=tj�tj�d��d��}i|_i|_	t
|d���5}|�|||��ddd��dS#1swxYwYdS#t$rFt
|d���5}|�|||��ddd��YdS#1swxYwYYdSwxYw)N�~z.netrczutf-8)�encoding�locale)	�os�path�join�
expanduser�hosts�macros�open�_parse�UnicodeDecodeError)r
�file�
default_netrcrs    rrznetrc.__init__Cs������
��<��7�<�<��� 2� 2�3� 7� 7��B�B�D���
����	5��d�W�-�-�-�
5�����D�"�m�4�4�4�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5����
5�
5�
5�
5�
5�
5��!�	5�	5�	5��d�X�.�.�.�
5�"����D�"�m�4�4�4�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5�
5����
5�
5�
5�
5�
5�
5�
5�	5���sZ�B�$B	�<B�	B
�
B�B
�B�C&�1C�	C&�C	�C&�C	�C&�%C&c���t|��}	|j}|���x}}|sdS|ddkr8|j|kr,t|��dkr|j����f|dkr|���}n�|dkrd}n�|dkrz|���}g|j|<	|j���}	|	std||j���|	dkrn!|j|�|	���Y��
td	|z||j���|std
|z||j���dx}
x}}i|j	|<	|j}
|���}|�
d��r%|j|
kr|j����V|dvr#|
||f|j	|<|�|��nq|d
ks|dkr|���}
nO|dkr|���}n4|dkr|���}ntd|z||j�����|�|||j	|d����e)Nrr�#�machine�default�macdefz.Macro definition missing null line terminator.r!zbad toplevel token %rzmissing %r namer&>r&rErDrC�login�user�account�passwordzbad follower token %r)
rr	r-�lenr�readliner;rr/r:�
startswithr0�_security_check)r
r?rr@�lexer�saved_lineno�toplevel�tt�	entryname�linerFrHrI�prev_linenos              rr=znetrc._parsePs����"�
�
��<	N� �<�L�!�O�O�-�-�-�H�r��
F����A��#����<�<�/�/�C��G�G�q�L�L��N�+�+�-�-�-���y���!�O�O�-�-�	�	��y���%�	�	��x���!�O�O�-�-�	�)+���I�&�8� �>�2�2�4�4�D��0�-�L� �%�,�0�0�0��t�|�|���K�	�*�1�1�$�7�7�7�8��%�+�b�0�$���F�F�F��
R�%�&7�"�&<�d�E�L�Q�Q�Q�*,�+�E�+�G�h�$&�D�J�y�!�
>�#�l���_�_�&�&���=�=��%�%���|�{�2�2���/�/�1�1�1���=�=�=�-2�G�X�,F�D�J�y�)��$�$�R�(�(�(���7�]�]�b�F�l�l�!�O�O�-�-�E�E��9�_�_�#�o�o�/�/�G�G��:�%�%�$���0�0�H�H�)�*A�B�*F�*.���>�>�>�%
>�(
� � ��]�D�J�y�4I�!�4L�M�M�M�y<	Nrc��tjdk�r&|�r%|dk�r tj|�����}|jtj��kr�ddl}	|�|j��d}n#t$r
d|jz}YnwxYw	|�tj����d}n&#t$rdtj��z}YnwxYwtd|�d|�d����|j
tjtj
zzrtd���dSdSdSdS)	N�posix�	anonymousrzuid %sz~/.netrc file owner (z, z) does not match current userzY~/.netrc access too permissive: access permissions must restrict access to only the owner)r6�name�fstat�fileno�st_uid�getuid�pwd�getpwuid�KeyErrorr�st_mode�stat�S_IRWXG�S_IRWXO)r
rr@rF�propr]�fownerrGs        rrMznetrc._security_check�sp��
�7�g���-��E�[�4H�4H��8�B�I�I�K�K�(�(�D��{�b�i�k�k�)�)��
�
�
�4� �\�\�$�+�6�6�q�9�F�F���4�4�4�%���3�F�F�F�4����2��<�<��	���4�4�Q�7�D�D���2�2�2�#�b�i�k�k�1�D�D�D�2����%�%�V�%�%�t�%�%�%�'�'�'�����t�|� ;�<�
"�%�!�"�"�"�!����4H�4H�
"�
"s$�# B�B�B�,C� C/�.C/c�^�||jvr
|j|Sd|jvr
|jdSdS)z8Return a (user, account, password) tuple for given host.rDN)r:)r
�hosts  r�authenticatorsznetrc.authenticators�s;���4�:����:�d�#�#�
�$�*�
$�
$��:�i�(�(��4rc�J�d}|j���D]G}|j|}|d|�d|d�d�z
}|dr|d|d�d�z
}|d|d	�d�z
}�H|j���D]%}|d
|�d�z
}|j|D]}||z
}�|dz
}�&|S)z3Dump the class data in the format of a .netrc file.r&zmachine z
	login rr!rz		account z
	password �zmacdef )r:�keysr;)r
�reprg�attrs�macrorSs      r�__repr__znetrc.__repr__�s������J�O�O�%�%�	.�	.�D��J�t�$�E��:�d�:�:�e�A�h�:�:�:�:�C��Q�x�
1��0�E�!�H�0�0�0�0���-��q��-�-�-�-�C�C��[�%�%�'�'�	�	�E��&�U�&�&�&�&�C���E�*�
�
���t�����4�K�C�C��
rr)rrrrr=rMrhrorrrrrBsh������5�5�5�5�>N�>N�>N�@"�"�"�,�������r�__main__)rr6�shlexra�__all__rrrrr�printrrr�<module>rts���3�3��������������%�
&��	K�	K�	K�	K�	K�i�	K�	K�	K�)$�)$�)$�)$�)$�)$�)$�)$�X{�{�{�{�{�{�{�{�z�z���	�E�%�%�'�'�N�N�N�N�N��r

Zerion Mini Shell 1.0