1

When I forget a password and need to check it in chrome, It asks me enter my PIN for my laptop before viewing, in a windows authorisation dialog. Does anybody know how to access this with python? Ask for the PC's login password with python?

Here is the dialog i'm looking for:

enter image description here

  • You probably need to convert this into Python using cpython, pywin32. https://stackoverflow.com/questions/4134882/show-authentication-dialog-in-c-sharp-for-windows-vista-7. Also see: https://learn.microsoft.com/en-us/windows/win32/api/wincred/nf-wincred-creduipromptforwindowscredentialsa – abdusco Jul 21 '19 at 16:16
  • Search github for `CredUIPromptForWindowsCredentialsA`, you'll find many code examples. https://github.com/search?q=CredUIPromptForWindowsCredentialsA&type=Code. But none in Python :/ – abdusco Jul 21 '19 at 16:21
  • Do you know if this function is available in the `pywin32` module? –  Jul 21 '19 at 16:23
  • It doesn't seem so :( – abdusco Jul 21 '19 at 16:25
  • This question got me interested. I'll post updates as I figure this stuff out. https://stackoverflow.com/questions/27067175/trying-to-call-wincred-api-using-ctypes – abdusco Jul 21 '19 at 16:25
  • Something similar: https://gist.github.com/exhuma/a310f927d878b3e5646dc67dfa509b42 – abdusco Jul 21 '19 at 16:32
  • Thanks! I will look into this as well. - `pywin32` does have one, but its... not the dialogue I'm looking for. Will add a screenshot in the question. –  Jul 21 '19 at 16:33
  • https://askubuntu.com/questions/125314/how-do-i-call-a-dialog-for-authentication might help? If there is a windows equivalent? –  Jul 21 '19 at 16:50
  • It may not be ideal, but you could try compiling a barebones app that takes prompts for credentials in C# and call it in Python – abdusco Jul 21 '19 at 16:56
  • Hmm. Will give that a go... In c++ probably though... –  Jul 21 '19 at 17:00

0 Answers0