how to unmask your passwords securely – JavaScript

Unmasking passwords can remove a lot of frustration when trying to enter long and/or complicated passwords. This simple JavaScript below enables you to do this on any site you are visiting at your discretion.
Remember that doing this will reduce security, for example in an internet cafe where someone could shoulder surf; so use this technique with due diligence and discretion. You have been warned, and I take no responsibility for problems caused by using this script.

var els = document.getElementsByTagName('input');
for(var x = 0; x < els.length; x++) {
if(els[x].type.toLowerCase() == 'password' ) {
var test = els[x].type = 'text';
}
}

Simply paste javascript: at the beginning of that, and delete all the newlines so that it becomes a one-liner, then you can delete the text in your browser’s address bar and paste the JavaScript snippet in the address bar instead, then hit Enter. This will cause masked passwords to be revealed.

If you find you will use this a lot, you can bookmark the script. Simply create a bookmark for any page you wish (preferably without an icon), then edit the properties of it so that the URL it points to is the script (ie javascript: var els = document.getElementsByTagName('input'); for(var x = 0; x < els.length; x++) { if(els[x].type.toLowerCase() == 'password' ) { var test = els[x].type = 'text'; }} and rename the bookmark to something common-sense such as “UNMASKER”.

There you have it. [Sourced from techrepublic]

Advertisements

About Cameron
I'm a final year Computer Science/Information Systems major. Already finished my BA in Politics/Philosophy. I do web and software freelance on the side, while I finish studying. Hoping to be self-employed by the end of my degree, otherwise off into the real-world I go....

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: