Your IP : 3.138.105.128
���]j � @ s. d d l Z d d l Z d d l Z d d l Z d d l Z d d d g Z Gd d � d e � Z d d d d � Z d d d d
� Z d d d d � Z
d
d d d d � Z d d � Z y d d l
Z
e
j e
j f WnI e e f k
r#y d d l Z Wn e k
re
Z Yn Xe Z Yn Xe Z d S)� N�getpass�getuser�GetPassWarningc @ s e Z d Z d S)r N)�__name__�
__module__�__qualname__� r r �,/opt/alt/python35/lib64/python3.5/getpass.pyr s z
Password: c . C s$ d } t j � �} yg t j d t j t j B� } t j | d � } | j | � t j | � } | j | � | s{ | } Wn� t
k
r} zj | j � y t j
j � } Wn- t t f k
r� d } t | | � } Yn Xt j
} | s� t j } WYd d } ~ Xn X| d k ry� t j | � } | d d � } | d t j M<t j }
t t d � rn|
t j O}
z, t j | |
| � t | | d | �} Wd t j | |
| � | j � XWnI t j k
r| d k r�� | | k r�| j � t | | � } Yn X| j d � | SWd QRXd S)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� tcgetattrZECHOZ TCSAFLUSH�hasattrr � tcsetattr�
_raw_input�flush�error�write)�prompt�streamZpasswd�stack�fdZttyr �e�old�newZtcsetattr_flagsr r r �unix_getpass sR
r0 c C s� t j t j k r t | | � Sx | D] } t j | � q&