3

The standard way to enter a password in Python without echoing it is using getpass.getpass().

However,it doesn't support clipboard input (ctrl-V), which is needed when dealing with complex, highly secure passwords.

Has anyone ever come up with a workaround (get the password silently from crtl-V)?

Thanks!

R.

mrgou
  • 1,576
  • 2
  • 21
  • 45

1 Answers1

5

It is possible to right click paste from clipboard into the command prompt as an alternative.

Unfortunately getpass.getpass() uses getwch() from Windows C, which does not allow CTRL+C to be read.

dejanualex
  • 3,872
  • 6
  • 22
  • 37
Alexander Kvist
  • 559
  • 6
  • 12