Best practice prompting for password

Chris Mellon arkanes at gmail.com
Fri Sep 7 10:55:28 EDT 2007


On 9/7/07, GiBo <gibo at gentlemail.com> wrote:
> Hi,
>
> what's the best practice to securely prompt user for password on console
> in Python? IIRC some programs like SSH do a lot to ensure that the input
> comes from TTY and is not redirected from somewhere and several other
> checks. In the case of OpenSSH even the password prompt is always
> displayed regardless if the output is redirected to a file or not.
>
> Any pointers to best practice or code snippet of python password prompt?
>

The getpass module.



More information about the Python-list mailing list