Author Topic: Unmask your passwords  (Read 2771 times)

0 Members and 1 Guest are viewing this topic.

August 15, 2009, 12:28:12 pm
Read 2771 times


  • Administrator
  • Hero Member

  • Offline
  • *****

  • 3335

On the other hand, there are times it can be nice to see your password, and where you can be reasonably certain nobody else is going to see it on your screen. For those times, it would be nice to have a way to unmask a password.

A snippet of JavaScript is here to save the day:

  var els = document.getElementsByTagName('input');
  for(var x = 0; x < els.length; x++) {
  • .type.toLowerCase() == 'password' ) {

      var test = els
  • .type = 'text';


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