Skip to content

Instantly share code, notes, and snippets.

@raphaelpor
Created March 5, 2015 14:25
Show Gist options
  • Save raphaelpor/10dd58b4b93451ac1bc4 to your computer and use it in GitHub Desktop.
Save raphaelpor/10dd58b4b93451ac1bc4 to your computer and use it in GitHub Desktop.
Javascript to show passwords.
(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) console.info("Passwords on this page:\n\n" + s); else console.info("There are no passwords in forms on this page.");})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment