grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|jfã @sÚdZddlZddlZddlZddlZddlZgd¢ZGdd„deƒZddd„Z dd d „Z dd d „Z ddd„Z dd„Z z ddlZejejfWn"eefyhzddlZWn eybe ZYYdSwe ZYdSwe ZdS)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@s eZdZdS)rN)Ú__name__Ú __module__Ú __qualname__©rrú./opt/alt/python310/lib64/python3.10/getpass.pyrs rú Password: c CsÂd}t ¡�Ñ}z%t dtjtjB¡}t |d¡}| |¡t  |¡}| |¡|s+|}Wn/t y[|  ¡zt j  ¡}WnttfyPd}t||ƒ}Ynwt j }|sYt j}Ynw|durÉzLt |¡}|dd…}|dtjM<tj} ttdƒrƒ| tjO} zt || |¡t|||d�}Wt || |¡| ¡n t || |¡| ¡wWntjyÈ|dur¹‚||urÁ|  ¡t||ƒ}Ynw| d¡|WdƒS1sÚwYdS)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Ú tcgetattrZECHOZ TCSAFLUSHÚhasattrr Ú tcsetattrÚ _raw_inputÚflushÚerrorÚwrite) ÚpromptÚstreamZpasswdÚstackÚfdZttyr ÚoldÚnewZtcsetattr_flagsrrr Ú unix_getpasssb     € þ€ö      ÿö $Ïr0cCsŽtjtjur t||ƒS|D]}t |¡q d} t ¡}|dks$|dkr%n|dkr+t‚|dkr6|dd…}n||}qt d¡t d¡|S) z:Prompt for password with echo off, using Windows getwch().Úéú rúúNéÿÿÿÿ)rrÚ __stdin__r ÚmsvcrtZputwchZgetwchÚKeyboardInterrupt)r*r+ÚcZpwrrr Ú win_getpassas$   ÷ r;cCs0tjdtdd�|s tj}td|d�t||ƒS)Nz%Can not control echo on the terminal.é)Ú stacklevelz&Warning: Password input may be echoed.)Úfile)ÚwarningsÚwarnrrr!Úprintr&)r*r+rrr r xsÿ  r r1cCsš|stj}|s tj}t|ƒ}|r7z| |¡Wnty2| |jd¡}| |j¡}| |¡Ynw|  ¡|  ¡}|s?t ‚|ddkrK|dd…}|S)NÚreplacer6r) rr!rÚstrr)ÚUnicodeEncodeErrorÚencodeÚencodingÚdecoder'ÚreadlineÚEOFError)r*r+r Úlinerrr r&�s(  ü  r&cCs<dD]}tj |¡}|r|Sqddl}| t ¡¡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. )ZLOGNAMEZUSERZLNAMEZUSERNAMErN)rÚenvironÚgetÚpwdÚgetpwuidÚgetuid)ÚnameÚuserrMrrr ršs ÿr)r N)r1NN)Ú__doc__rrrrr?Ú__all__Ú UserWarningrr0r;r r&rr"r#r%Ú ImportErrorrr8rrrrr Ús2  D     ÿ ú