How To Reveal Stored Passwords in Firefox, Chrome, Safari, and IE
Nowadays browsers store passwords then auto-populate forms, hiding that stored password behind little dots or asterisks. Guess what? There is a way to reveal the password hidden behind there. This is very handy for when you forget your password but have it stored in the browser.
Reveal Stored Passwords in Mozilla Firefox and Chrome
Navigate to the page where the passwords are stored. Paste this code into the location bar and hit enter. The passwords will be revealed.
javascript: var p=r(); function r(){var g=0;var x=false;var x=z(document.forms);g=g+1;var w=window.frames;for(var k=0;k<w.length;k++) {var x = ((x) || (z(w[k].document.forms)));g=g+1;}if (!x) alert('Password not found in ' + g + ' forms');}function z(f){var b=false;for(var i=0;i<f.length;i++) {var e=f[i].elements;for(var j=0;j<e.length;j++) {if (h(e[j])) {b=true}}}return b;}function h(ej){var s='';if (ej.type=='password'){s=ej.value;if (s!=''){prompt('Password found ', s)}else{alert('Password is blank')}return true;}}
Note that the flip-side of this trick is that you probably shouldn’t be storing your password for sensitive websites – anyone with access to your computer could use this trick to reveal your password, write it down, then check your email/bank/cheating-on-your-spouse account from anywhere.


March 20th, 2010 at 6:42 am
[...] untung nemu ini: How To Reveal Stored Passwords in Firefox, Chrome, Safari, and IE [...]
July 7th, 2010 at 4:26 pm
This is an impressive coding, kind of you to share it. Works a charm and so well that I got a fright. I thought maybe it sent it to you but on examining the code I could see this cannot be exploited :)