0

I am building a web browser with PyQt6 and its WebEngine framework, and would like to make a password manager that enters usernames and passwords directly into websites in the WebEnginePage being displayed. I know how to store passwords, and associate them with a website, but I cannot figure out how to detect the specific input fields on the website that I want to save. I am also not sure of how to alter the fields on the website to make it display the passwords.

I am aware of the html input types "password" and "email", but not all websites will necessarily use them. Is there some way to find specific html form inputs that correspond to usernames and passwords, and then to insert them in a such a way that a user can still send them back to the website?

2
  • if page doesn't use password and email then program should allow to select fields by user manually. I see this method in password manager KeePassXC and I think other password managers may have also this functionallity - and later program should remember url and fields. Commented Apr 10 at 23:56
  • You could try using QWebEngineUrlRequestInterceptor and examine the headers of the QWebEngineUrlRequestInfo to see if password authentication is being attempted. The first time the user does this for an unknown page, it might be possible to search the html for the fields containing the username/password, then store all the info ready for the next time the user visits. This is obviously a non-trivial task, so I doubt you'll find any ready-made solutions. Commented Apr 12 at 13:15

1 Answer 1

0

I would suggest you see the associated label, or the placeholder (within the input tag). And I believe both the username and password input fields should be present for a login form

  • Keep in mind that credentials have many different "names" (for password: PIN, secret etc. for the login: email, username etc)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.