Your IP : 3.147.86.30


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/netrc.cpython-312.opt-2.pyc

�

�Q�f
���	ddlZddlZddgZGd�de�ZGd�d�ZGd�d�Zedk(ree��yy)	�N�netrc�NetrcParseErrorc��eZdZ	dd�Zd�Zy)rNc�Z�||_||_||_tj	||�y�N)�filename�lineno�msg�	Exception�__init__)�selfr
rr	s    �,/opt/alt/python312/lib64/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__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,r/rrrrrs�����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�-�����D�"�m�4�.�-�-��!�	5��d�X�.�"����D�"�m�4�/�.�.��	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%rDrCrB�login�user�account�passwordzbad follower token %r)
rr	r,�lenr�readliner:rr.r9�
startswithr/�_security_check)r
r>rr?�lexer�saved_lineno�toplevel�tt�	entryname�linerErGrH�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)r5�name�fstat�fileno�st_uid�getuid�pwd�getpwuid�KeyErrorr�st_mode�stat�S_IRWXG�S_IRWXO)r
rr?rE�propr\�fownerrFs        rrLznetrc._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�z�	||jvr|j|Sd|jvr|jdSy)NrC)r9)r
�hosts  r�authenticatorsznetrc.authenticators�s>��F��4�:�:���:�:�d�#�#�
�$�*�*�
$��:�:�i�(�(�rc�L�	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)Nr%zmachine z
	login rr rz		account z
	password �zmacdef )r9�keysr:)r
�reprf�attrs�macrorRs      r�__repr__znetrc.__repr__�s���A����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<rLrgrnrrrrrBs��5�>N�@"�,�r�__main__)	r5r`�__all__rrrrr�printrrr�<module>rrsV��3���%�
&��	K�i�	K�)$�)$�X{�{�z�z��	�%�'�N�r

?>