Edit File: getpass.cpython-311.pyc
� �����ff�����������������������������d�Z�ddlZddlZddlZddlZddlZg�d�Z�G�d��de������������Zd d�Z d d�Z d d �Zdd�Zd��Z �ddlZej��������ej��������f�e ZdS�#�eef$�r� �ddlZe ZY�dS�#�e$�r�eZY�Y�dS�w�xY�ww�xY�w)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�������������������������e�Zd�ZdS�)r���N)�__name__� __module__�__qualname__��������./opt/alt/python311/lib64/python3.11/getpass.pyr���r������s�����������������r���r���� Password: c����������������������d}t����������j����������������������5�} �t����������j��������dt����������j��������t����������j��������z��������������}t ����������j��������|d������������}|���������������������|�������������t ����������j ��������|������������}|���������������������|�������������|s|}n�#�t����������$�rz�|������������������������������������ �t����������j �������������������������������������������}n)#�t����������t ����������f$�r�d}t#����������|�|������������}Y�nw�xY�wt����������j ��������}|st����������j��������}Y�nw�xY�w|��. �t'����������j��������|������������}|dd����������}|dxx���������t&����������j���������z��cc<���t&����������j��������} t/����������t&����������d������������r| t&����������j��������z��} �t'����������j��������|| |�������������t5����������|�||�������������}t'����������j��������|| |�������������|������������������������������������n/#�t'����������j��������|| |�������������|������������������������������������w�xY�wn@#�t&����������j��������$�r.�|���||ur|������������������������������������t#����������|�|������������}Y�nw�xY�w|���������������������d�������������|cddd�������������S�#�1�swxY�w�Y���dS�)a��Prompt 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_getpassr9������s��������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����t�����������j��������t�����������j��������urt����������|�|������������S�|�D�]}t ����������j��������|��������������d} �t ����������j����������������������}|dk����s|dk����rn$|dk����rt�����������|dk����r|dd����������}n||z���}�Dt ����������j��������d�������������t ����������j��������d�������������|S�) z:Prompt for password with echo off, using Windows getwch().������� r�����N���)r���r ���� __stdin__r$����msvcrt�putwch�getwch�KeyboardInterrupt)r0���r1����c�pws��� r����win_getpassrH���a���s������� �y�� �%�%����/�/�/� ������� �a����� �B� ��M�O�O����9�9��T� � ����;�;�#�#���9�9��C�R�C��B�B��a��B� ���M�$���� �M�$���� �Ir���c�����������������������t����������j��������dt����������d��������������|st����������j��������}t����������d|��������������t ����������|�|������������S�)Nz%Can not control echo on the terminal.����)� stacklevelz&Warning: Password input may be echoed.)�file)�warnings�warnr���r���r%����printr,���)r0���r1���s��� r���r$���r$���x���sV�������M�9�>�� �� �� �� ������� � 2��@�@�@�@��f�f�%�%�%r���r;���c�����������������������|st�����������j��������}|st�����������j��������}t����������|�������������}�|�r� �|���������������������|��������������nZ#�t ����������$�rM�|����������������������|j��������d������������}�|����������������������|j��������������������}�|���������������������|��������������Y�nw�xY�w|� �����������������������������������|� ����������������������������������}|st�����������|d���������dk����r |d�d����������}|S�)N�replacer@���r���)r���r%���r ����strr/����UnicodeEncodeError�encode�encoding�decoder-����readline�EOFError)r0���r1���r����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�]'}�t�����������j�����������������������������|�������������}|r|c�S��(ddl}|���������������������t����������j����������������������������������d���������S�)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�USERNAMEr���N)r����environ�get�pwd�getpwuid�getuid)�name�userra���s��� r���r���r�������sd�������9�������z�~�~�d�#�#���� ��K�K�K� ���J�J�J��<�<�� ���$�$�Q�'�'r���)r ���N)r;���NN)�__doc__r���r���r���r���rM����__all__�UserWarningr���r9���rH���r$���r,���r���r&���r'���r+���r����ImportErrorr"���rB���r ���r���r����<module>rj������s_���� �� � ��������� � � � �� � � � �� � � � ������ 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