Hacked By AnonymousFox

Current Path : /opt/alt/python311/lib64/python3.11/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/getpass.cpython-311.opt-1.pyc

�

c��ff����dZddlZddlZddlZddlZddlZgd�ZGd�de��Zd
d�Z	d
d�Z
d
d	�Zdd�Zd�Z
	ddlZejejfe	ZdS#eef$r	ddlZe
ZYdS#e$reZYYdSwxYwwxYw)a�Utilities to get a password and/or the current user name.

getpass(prompt[, stream]) - Prompt for a password, with echo turned off.
getuser() - Get the user name from the environment or password database.

GetPassWarning - This UserWarning is issued when getpass() cannot prevent
                 echoing of the password contents while reading.

On Windows, the msvcrt module will be used.

�N)�getpass�getuser�GetPassWarningc��eZdZdS)rN)�__name__�
__module__�__qualname__���./opt/alt/python311/lib64/python3.11/getpass.pyrrs�������rr�
Password: c��d}tj��5}	tjdtjtjz��}t
j|d��}|�|��t
j	|��}|�|��|s|}n�#t$rz|���	tj
���}n)#tt f$rd}t#||��}YnwxYwtj
}|stj}YnwxYw|��.	t'j|��}|dd�}|dxxt&jzcc<t&j}	t/t&d��r|	t&jz}		t'j||	|��t5|||���}t'j||	|��|���n/#t'j||	|��|���wxYwn@#t&j$r.|��||ur|���t#||��}YnwxYw|�d��|cddd��S#1swxYwYdS)aPrompt for a password, with echo turned off.

    Args:
      prompt: Written on stream to ask for the input.  Default: 'Password: '
      stream: A writable file object to display the prompt.  Defaults to
              the tty.  If no tty is available defaults to sys.stderr.
    Returns:
      The seKr3t input.
    Raises:
      EOFError: If our input tty or stdin was closed.
      GetPassWarning: When we were unable to turn echo off on the input.

    Always restores terminal settings before returning.
    Nz/dev/ttyzw+��TCSASOFT)�input�
)�
contextlib�	ExitStack�os�open�O_RDWR�O_NOCTTY�io�FileIO�
enter_context�
TextIOWrapper�OSError�close�sys�stdin�fileno�AttributeError�
ValueError�fallback_getpass�stderr�termios�	tcgetattr�ECHO�	TCSAFLUSH�hasattrr�	tcsetattr�
_raw_input�flush�error�write)
�prompt�stream�passwd�stack�fd�ttyr�old�new�tcsetattr_flagss
          r�unix_getpassr9s����F�	�	�	�	�1�5�	$����R�Y�r�{�%:�;�;�B��)�B��%�%�C�����$�$�$��$�S�)�)�E�����&�&�&��
������
	$�
	$�
	$��K�K�M�M�M�
:��Y�%�%�'�'����"�J�/�
:�
:�
:���)�&�&�9�9����
:�����I�E��
$������
	$�����>�
:��'��+�+���!�!�!�f���A����7�<�-�'����")�"3���7�J�/�/�8�#�w�'7�7�O�#��%�b�/�3�?�?�?�'���e�D�D�D�F��%�b�/�3�?�?�?��L�L�N�N�N�N���%�b�/�3�?�?�?��L�L�N�N�N�N����N���=�

:�

:�

:��%����&�&��K�K�M�M�M�)�&�&�9�9����

:����	���T�����c1�1�1�1�1�1�1�1�1�1�1�1����1�1�1�1�1�1s��I7�BB�I7�D �;C�D �#D�=D �?D�D �I7�D � I7�'A)H�(G$�9+H�$,H�H�I7�:I�I7�I�I7�7I;�>I;c�f�tjtjurt||��S|D]}t	j|���d}	t	j��}|dks|dkrn$|dkrt�|dkr|dd�}n||z}�Dt	jd��t	jd��|S)	z:Prompt for password with echo off, using Windows getwch().���
r��N���)rr �	__stdin__r$�msvcrt�putwch�getwch�KeyboardInterrupt)r0r1�c�pws    r�win_getpassrHas���
�y��
�%�%����/�/�/�
�����
�a�����	�B�	��M�O�O����9�9��T�	�	����;�;�#�#���9�9��C�R�C��B�B��a��B�	��M�$����
�M�$����
�Irc��tjdtd���|stj}td|���t
||��S)Nz%Can not control echo on the terminal.�)�
stacklevelz&Warning: Password input may be echoed.)�file)�warnings�warnrrr%�printr,)r0r1s  rr$r$xsV���M�9�>�� � � � ������	�
2��@�@�@�@��f�f�%�%�%rr;c���|stj}|stj}t|��}|r�	|�|��nZ#t
$rM|�|jd��}|�|j��}|�|��YnwxYw|�	��|�
��}|st�|ddkr
|dd�}|S)N�replacer@r)rr%r �strr/�UnicodeEncodeError�encode�encoding�decoder-�readline�EOFError)r0r1r�lines    rr,r,�s�����������	��
��[�[�F�
��	!��L�L�� � � � ��!�	!�	!�	!��]�]�6�?�I�>�>�F��]�]�6�?�3�3�F��L�L�� � � � � �		!����
	�������>�>���D������B�x�4����C�R�C�y���Ks�A�AB�Bc��dD]'}tj�|��}|r|cS�(ddl}|�tj����dS)z�Get the username from the environment or password database.

    First try various environment variables, then the password
    database.  This works on Windows as long as USERNAME is set.

    )�LOGNAME�USER�LNAME�USERNAMErN)r�environ�get�pwd�getpwuid�getuid)�name�userras   rrr�sd��9�����z�~�~�d�#�#���	��K�K�K�	��J�J�J��<�<��	���$�$�Q�'�'r)r
N)r;NN)�__doc__rrrrrM�__all__�UserWarningrr9rHr$r,rr&r'r+r�ImportErrorr"rBr
rr�<module>rjs_��
�
� ����	�	�	�	�	�	�	�	�
�
�
�
�����
0�
0�
0��(�'�'�'�'�[�'�'�'�A�A�A�A�H����.&�&�&�&�����2(�(�(�$
��N�N�N���w�(�(�(��G�G�G��	�^�$������
�
�
��������#�#�#�"������#�������s/�A�A4�A$�A4�$A0�+A4�/A0�0A4

Hacked By AnonymousFox1.0, Coded By AnonymousFox