ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
L\¬Qc@s9dZddlZddlZddlZdddgZdefd„ƒYZddd„Zddd    „Z    ddd
„Z
d ddd „Z d „Z y ddl Z e je jfWnueefk
r.yddlZWnEek
r$yddlmZWnek
re
Zq+XeZq5Xe    ZnXeZdS(sÁ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.
On the Mac EasyDialogs.AskPassword is used, if available.
 
iÿÿÿÿNtgetpasstgetusertGetPassWarningcBseZRS((t__name__t
__module__(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/getpass.pyRss
Password: c
CsÌd}d}yJtjdtjtjBƒ}tj|ddƒ}|}|sU|}nWnjtk
rÂ}ytjj    ƒ}Wn&t
t fk
r£t ||ƒ}nXtj}|sÃtj }qÃnX|dk    r»d}y£tj|ƒ}|}|dctjM<tj}    ttdƒr*|    tjO}    nz,tj||    |ƒt||d|ƒ}Wdtj||    |ƒ|jƒXWq»tjk
r·}|dk    rŸ‚n~~t ||ƒ}q»Xn|jdƒ|S(    sPrompt 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.
    s/dev/ttysw+iitTCSASOFTtinputNs
(tNonetostopentO_RDWRtO_NOCTTYtfdopentEnvironmentErrortsyststdintfilenotAttributeErrort
ValueErrortfallback_getpasststderrttermiost    tcgetattrtECHOt    TCSAFLUSHthasattrRt    tcsetattrt
_raw_inputtflushterrortwrite(
tprompttstreamtfdtttyRtetpasswdtoldtnewttcsetattr_flags((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/getpass.pyt unix_getpasssJ            cCsÓtjtjk    rt||ƒSddl}x|D]}|j|ƒq2Wd}xc|jƒ}|dksv|dkrzPn|dkrt‚n|dkr¨|d }qR||}qR|jdƒ|jdƒ|S(s9Prompt for password with echo off, using Windows getch().iÿÿÿÿNts s
ss(RRt    __stdin__RtmsvcrttputchtgetchtKeyboardInterrupt(RR R+tctpw((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/getpass.pyt win_getpassYs$              cCs?tjdtddƒ|s(tj}n|dIJt||ƒS(Ns%Can not control echo on the terminal.t
stacklevelis&Warning: Password input may be echoed.(twarningstwarnRRRR(RR ((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/getpass.pyRps  
R)cCsŒ|stj}n|s$tj}nt|ƒ}|rP|j|ƒ|jƒn|jƒ}|skt‚n|ddkrˆ|d }n|S(Niÿÿÿÿs
(RRRtstrRRtreadlinetEOFError(RR Rtline((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/getpass.pyRys           cCs\ddl}x*dD]"}|jj|ƒ}|r|SqWddl}|j|jƒƒdS(    sÂ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.
 
    iÿÿÿÿNtLOGNAMEtUSERtLNAMEtUSERNAMEi(R9R:R;R<(Rtenvirontgettpwdtgetpwuidtgetuid(RtnametuserR?((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/getpass.pyRs   (t AskPassword(t__doc__RRR3t__all__t UserWarningRRR(R1RRRRRRt ImportErrorRR+t EasyDialogsRDR(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/getpass.pyt<module> s,$?