%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3.12/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3.12/__pycache__/netrc.cpython-312.pyc

�

���f
���dZddlZddlZddgZGd�de�ZGd�d�ZGd�d�Zed	k(re	e��yy)
z-An object-oriented interface to .netrc files.�N�netrc�NetrcParseErrorc��eZdZdZdd�Zd�Zy)rz5Exception raised on syntax errors in the .netrc file.Nc�Z�||_||_||_tj	||�y�N)�filename�lineno�msg�	Exception�__init__)�selfr
rr	s    �/usr/lib/python3.12/netrc.pyrzNetrcParseError.__init__s'�� ��
����������4��%�c�T�|j�d|j�d|j�d�S)Nz (z, line �))r
rr	)r
s r�__str__zNetrcParseError.__str__s��%)�X�X�t�}�}�d�k�k�J�Jr)NN)�__name__�
__module__�__qualname__�__doc__rr�rrrr
s��?�&�Krc�$�eZdZd�Zd�Zd�Zd�Zy)�	_netrclexc�<�d|_||_d|_g|_y)N�z
	
 )r	�instream�
whitespace�pushback)r
�fps  rrz_netrclex.__init__s�������
�#�����
rc�p�|jjd�}|dk(r|xjdz
c_|S)Nr�
)r�readr	)r
�chs  r�
_read_charz_netrclex._read_chars0��
�]�]�
�
��
"��
��:��K�K�1��K��	rc��|jr|jjd�Sd}t|jd�}|D]�}||jvr�|dk(r-|D]'}|dk(r|ccS|dk(r|j�}||z
}�)�D|dk(r|j�}||z
}|D]0}||jvr|ccS|dk(r|j�}||z
}�2��|S)Nr��"�\)r�pop�iterr$r)r
�token�fiterr#s    r�	get_tokenz_netrclex.get_token#s����=�=��=�=�$�$�Q�'�'����T�_�_�b�)���	 �B��T�_�_�$���S�y�� �B��S�y�$���t��!�_�_�.���R�K�E� ���:����*�B������ �B��T�_�_�,�$���t��!�_�_�.���R�K�E� �	 �(�rc�:�|jj|�yr)r�append)r
r+s  r�
push_tokenz_netrclex.push_token>s���
�
���U�#rN)rrrrr$r-r0rrrrrs�����6$rrc�,�eZdZdd�Zd�Zd�Zd�Zd�Zy)rNc��|du}|�=tjjtjjd�d�}i|_i|_	t
|d��5}|j|||�ddd�y#1swYyxYw#t$r9t
|d��5}|j|||�ddd�Yy#1swYYyxYwwxYw)N�~z.netrczutf-8)�encoding�locale)	�os�path�join�
expanduser�hosts�macros�open�_parse�UnicodeDecodeError)r
�file�
default_netrcrs    rrznetrc.__init__Cs������
��<��7�7�<�<���� 2� 2�3� 7��B�D���
����	5��d�W�-�
5�����D�"�m�4�
5�
5�
5��!�	5��d�X�.�
5�"����D�"�m�4�
5�
5�
5��	5�sH�
B	� A=�4B	�=B�B	�B	�	C�B=�3C�=C	�C�Cc��t|�}	|j}|j�x}}|sy|ddk(r8|j|k(r(t|�dk(r|jj��b|dk(r|j�}n�|dk(rd}n�|dk(ry|j�}g|j|<	|jj�}	|	std||j��|	dk(rn|j|j|	��X��td	|z||j��|std
|z||j��dx}
x}}i|j|<	|j}
|j�}|jd�r*|j|
k(r|jj��X|dvr$|
||f|j|<|j|�nb|d
k(s|dk(r|j�}
nF|dk(r|j�}n0|dk(r|j�}ntd|z||j����|j|||j|d���O)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[���"�
��� �<�<�L�!�O�O�-�-�H�r����A��#���<�<�<�/�C��G�q�L��N�N�+�+�-���y��!�O�O�-�	��y��%�	��x��!�O�O�-�	�)+����I�&�� �>�>�2�2�4�D��-�L� �%�,�,�0�0��t�|���K�K�	�*�1�1�$�7���%�+�b�0�$����F�F��%�&7�"�&<�d�E�L�L�Q�Q�*,�+�E�+�G�h�$&�D�J�J�y�!��#�l�l���_�_�&���=�=��%��|�|�{�2����/�/�1���=�=�-2�G�X�,F�D�J�J�y�)��$�$�R�(���7�]�b�F�l�!�O�O�-�E��9�_�#�o�o�/�G��:�%�$���0�H�)�*A�B�*F�*.����>�>�%�(
� � ��]�D�J�J�y�4I�!�4L�M�yrc�x�tjdk(r�|r�|dk7r�tj|j��}|jtj
�k7r\ddl}	|j|j�d}	|jtj
��d}td|�d|�d���|jtjtjzzrtd��yyyy#t$rd|jz}Y��wxYw#t$rdtj
�z}Y��wxYw)	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�s��
�7�7�g��-�E�[�4H��8�8�B�I�I�K�(�D��{�{�b�i�i�k�)��4� �\�\�$�+�+�6�q�9�F�2��<�<��	�	��4�Q�7�D�&�,�V�H�B�t�f�=%�%�'�'�������t�|�|� ;�<�%�!�"�"�=�5I�-��� �4�%����3�F�4�� �2�#�b�i�i�k�1�D�2�s$�$C8�&D�8D�D� D9�8D9c�x�||jvr|j|Sd|jvr|jdSy)z8Return a (user, account, password) tuple for given host.rDN)r:)r
�hosts  r�authenticatorsznetrc.authenticators�s;���4�:�:���:�:�d�#�#�
�$�*�*�
$��:�:�i�(�(�rc�J�d}|jj�D]=}|j|}|d|�d|d�d�z
}|dr|d|d�d�z
}|d|d	�d�z
}�?|jj�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�J�O�O�%�	.�D��J�J�t�$�E��X�d�V�:�e�A�h�Z�r�:�:�C��Q�x���E�!�H�:�R�0�0���[��q��
�"�-�-�C�	.��[�[�%�%�'�	�E��W�U�G�2�&�&�C����E�*�
���t���
��4�K�C�		�
�
rr)rrrrr=rMrhrorrrrrBs��5�>N�@"�,�r�__main__)
rr6ra�__all__rrrrr�printrrr�<module>rssV��3���%�
&��	K�i�	K�)$�)$�X{�{�z�z��	�%�'�N�r

Zerion Mini Shell 1.0