I want to setup and manage my own local 'autocomplete', so I can fill in the correct box with a password

StackOverflow https://stackoverflow.com/questions/20436829

It seems like passwords are always getting compromised. I want to write a program, preferably in C/C++ or Python, that I can use to fill in my passwords on the various sites I visit but do so from a program I manage on my machine that stores my pws and logins locally.

The reason a program is the best idea would be so that I can make very strong passwords and change them often. I would be able to choose my own encryption for the local storage/database. I would also be able to manage a schedule to keep passwords young.

I am asking the question because I haven't had much luck looking for a starting point. For instance, can I use Python to ask my browser for a list textboxes on a page I have open in a browser? Can I fill in the text boxes and click buttons from code that runs independent of the browser?

It didn't look like Google Python API was right, and I don't know that JS would act like a console app. Maybe Selenium and Python?

A good answer for me would be languages and platforms that would meet these requirements. I'm open to learning a new language or using a different browser, but I have no idea where to start.

Thanks in advance!

有帮助吗?

解决方案

Although there are ways to control your browser from a local Python/C/C++ application (see mechanize, from insepctorG4dget's comment), you would have a much easier time with an extension.

First of all, you wouldn't have to use some roundabout route, and instead, you could use well documented APIs. I'm not sure about other browsers, but I know that Chrome and Firefox both would be easy to make this in.

For storage, Chrome has the filesystem API and Firefox has the file API. Chrome also has the chrome.storage API, and if you use Chrome Sync, this could come in handy.

Extensions are made in HTML/CSS/JS, but the amount of HTML and CSS required for the type of extension you're looking for is a piece of cake, and if you're familiar with both Python and C, JS would be quite simple to pick up. You could also use a language that compiles to Javascript- there are tons out their.

There are plenty of libraries that would make your task easier in JavaScript than in some other library- for DOM access, of course, their's JQuery, and for encryption, there's sjcl. If you want a random password generator, of course, you could just use Math.random, in the core/built-in JS library.

Security

If someone wanted to steal your password from your local computer, a local application may be easier to steal from, as all the data is stored locally (although if it is encrypted, this wouldn't be so much of a problem). Locally stored passwords would be extremely hard to hack from externally, because the hackers would have to know exactly how your extension was implemented, and find some bug to exploit- near impossible if you do a decent job.

If you use Chrome's autocomplete, then it should be pretty secure from hackers- a popular browser like Chrome would have to be secure, but I have no idea how it was implemented, so you should probably double check on this. Just remember though, all of your passwords are being sent to advertisers and the NSA. ;)

An extension probably would be the least secure, since it may be vulnerable to both external and local attacks. However, again, either a local program, or an extension, you don't need worry unless:

  • You're doing something "Quick and Dirty"
  • You're not encrypting it
  • Some major organization with professional hackers wants all of your personal information
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top