ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python35/lib64/python3.5/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python35/lib64/python3.5/__pycache__/getpass.cpython-35.opt-2.pyc



���]j�@s.ddlZddlZddlZddlZddlZdddgZGdd�de�Zdddd�Zddd	d
�Z	dddd�Z
d
dddd�Zdd�Zy ddl
Z
e
je
jfWnIeefk
r#yddlZWnek
re
ZYnXe	ZYnXeZdS)�N�getpass�getuser�GetPassWarningc@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�,/opt/alt/python35/lib64/python3.5/getpass.pyrsz
Password: c.Cs$d}tj��}ygtjdtjtjB�}tj|d�}|j|�tj	|�}|j|�|s{|}Wn�t
k
r}zj|j�ytj
j�}Wn-ttfk
r�d}t||�}YnXtj
}|s�tj}WYdd}~XnX|dk	ry�tj|�}|dd�}	|	dtjM<tj}
ttd�rn|
tjO}
z,tj||
|	�t||d|�}Wdtj||
|�|j�XWnItjk
r|dk	r��||k	r�|j�t||�}YnX|jd�|SWdQRXdS)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_flagsrrr	�unix_getpasssR



		


r0cCs�tjtjk	rt||�Sx|D]}tj|�q&Wd}xdtj�}|dksj|dkrkP|dkr}t�|dkr�|dd�}qF||}qFWtjd�tjd�|S)N��
r
������)rr�	__stdin__r�msvcrtZputwchZgetwch�KeyboardInterrupt)r)r*�cZpwrrr	�win_getpassas"



r;cCsBtjdtdd�|s%tj}tdd|�t||�S)Nz%Can not control echo on the terminal.�
stacklevel�z&Warning: Password input may be echoed.�file)�warnings�warnrrr �printr%)r)r*rrr	rxs	rr1cCs�|stj}|stj}t|�}|r�y|j|�WnFtk
r�|j|jd�}|j|j�}|j|�YnX|j	�|j
�}|s�t�|ddkr�|dd�}|S)N�replacer5r
r6r6)rr r�strr(�UnicodeEncodeError�encode�encoding�decoder&�readline�EOFError)r)r*r�linerrr	r%�s&		

r%cCsPx*dD]"}tjj|�}|r|SqWddl}|jtj��dS)N�LOGNAME�USER�LNAME�USERNAMEr)rKrLrMrN)r�environ�get�pwd�getpwuid�getuid)�name�userrQrrr	r�s
)rrrrr?�__all__�UserWarningrr0r;rr%rr!r"r$�ImportErrorrr8rrrrr	�<module>s*D	


Zerion Mini Shell 1.0