Curiosity is bliss    Archive    Feed    About    Search

Julien Couvreur's programming blog and more

"Identify Password Fields" Greasemonkey script

 

Here's a simple user script to identify password fields .

Here's a screenshot which shows how password fields are identified with a special background pattern.

My first approach used an XPath query to find all the password fields and add a special CSS class to their className. Then I discovered one of many CSS selector tricks, which turns this script into a one-line CSS rule: input[type='password'] { background-image: url(data:xxx) }.
The data: url simply is a small gif with a transparent background, that can be tiled nicely.

Password Composer:
You should also give Johannes la Poutré's Password Composer user script a try. It's the Greasemonkey reincarnation of Nick Wolff's "Generate Password" bookmarklet, with an improved interface too (no popup, the generation occurs inline in the page).
The concept is that each site's password gets generated using some hash function, based on a master password (only password you need to remember and type when you want to log in somewhere) and the domain name of the site.

The main problem I see with this approach is it doesn't allow you to generate new passwords if you need to deprecate the old one. It seems the hashing should take a "password version" as an additional input, but then you have the problem of remembering which version you used for each site...
Anyways, I'm too lazy to change my passwords at so many sites ;-)

______________________________________

It'd be cool if the script could also find out the contrast color and choose the image accordingly. You can make 2-4 images with different color stripes. Or you could also maybe set the border around .

Posted by: Hunox (May 11, 2005 03:55 PM) ______________________________________

That attribute selector is actually part of CSS2: http://www.w3.org/TR/REC-CSS2/selector.html . It's one of the many nice things you can use when you don't have to worry about building lots of crutches to support explorer (a category which greasemonkey development easily falls under).

Posted by: Vineet Kumar (November 14, 2005 01:24 PM)
comments powered by Disqus