Skip to content

Instantly share code, notes, and snippets.

@dux
Created August 28, 2011 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dux/1177058 to your computer and use it in GitHub Desktop.
Save dux/1177058 to your computer and use it in GitHub Desktop.
try to find login form, user and pass input nodes - used on http://cryptero.com
var c_user, c_pass, c_form;
(function() {
for (var i=0;document.forms[i]; i++) {
for (j=0;document.forms[i][j];j++) {
if(document.forms[i][j].type=='text') {
c_user = document.forms[i][j]
}
if(document.forms[i][j].type=='password') {
c_form = document.forms[i]
c_pass = document.forms[i][j]
return;
}
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment