Home » Code

Masked Password Recovery

30. November 2008 by thebeebs 0 Comments

If you’ve forgotten your password but you’ve asked your browser to store it for you, you can recover the password by going to the page where the password is saved and entering the JavaScript below into the URL bar and pressing enter. The password should appear to you in an alert. This works in IE and Firefox… I haven’t tested Chrome yet but I imagine it will work too.

javascript:(function(){var s,F,j,f,i; s = ""; F = document.forms; for(j=0; j<F.length; ++j) { f = F[j]; for (i=0; i<f.length; ++i) { if (f[i].type.toLowerCase() == "password") s += f[i].value + "\n"; } } if (s) alert("Passwords in forms on this page:\n\n" + s); else alert("There are no passwords in forms on this page.");})();

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5