Skip to content

Instantly share code, notes, and snippets.

@teffalump
Created July 4, 2014 19:47
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 teffalump/0dcaa9e30886c9bb8896 to your computer and use it in GitHub Desktop.
Save teffalump/0dcaa9e30886c9bb8896 to your computer and use it in GitHub Desktop.
Show hidden fields in alert box in dwb (put in userscripts directory)
#!/usr/bin/zsh
# dwb: sp
echo -En "js var F,j,f,i;var s=new Array();F=document.forms;for(j=0;j<F.length;++j){f=F[j];for(i=0;i<f.length;++i){if(f.elements[i].type.toLowerCase()=='password'){s.push(f.elements[i].value)}}}if(s.length>0){alert('Passwords in forms on this page:\n\n'+s.join('\n'))}else{alert('There are no passwords in forms on this page.')};" > ${DWB_FIFO}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment