0

hey, I don't know if you have seen my other post or not, but I have been working on a small code lately to get the users credentials such as their password and username. As you can see, the code gives a warning and says there is a problem with getpass. After that, It asks for a password. i typed in testpassword which is not my password but it still thought it was. I do not want it to ask me for a password. I want it to simply give me the logged-in users password.

>>> import getpass
>>> f = getpass.getpass()
Warning: Problem with getpass. Passwords may be echoed.
Password: testpassword
>>> print f
testpassword
>>>

Edited by bob24bob: n/a

3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by crunchie
1

I want it to simply give me the logged-in users password.

Generally speaking, programs do not know passwords. A programs takes the password the user entered, converts it using some encryption algorithm, and compares to the stored password (stored in encrypted form only). Otherwise, anyone could steal any password with a simple program.

Edited by woooee: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.