snipt

Ctrl+h for KB shortcuts

Text only

Show passwords on web page

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

Description

Show any fields that are passwords in a form.
https://snipt.net/embed/8643b839ae7c22fb534523e19ee369e3/
/raw/8643b839ae7c22fb534523e19ee369e3/
8643b839ae7c22fb534523e19ee369e3
text
Text only
1
2019-06-25T20:47:13
True
False
False
Jan 04, 2016 at 06:34 PM
/api/public/snipt/64274/
show-passwords-on-web-page
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>javascript:(function(){var%20s,F,j,f,i;%20s%20=%20&quot;&quot;;%20F%20=%20document.forms;%20for(j=0;%20j&lt;F.length;%20++j)%20{%20f%20=%20F[j];%20for%20(i=0;%20i&lt;f.length;%20++i)%20{%20if%20(f[i].type.toLowerCase()%20==%20&quot;password&quot;)%20s%20+=%20f[i].value%20+%20&quot;\n&quot;;%20}%20}%20if%20(s)%20alert(&quot;Passwords%20in%20forms%20on%20this%20page:\n\n&quot;%20+%20s);%20else%20alert(&quot;There%20are%20no%20passwords%20in%20forms%20on%20this%20page.&quot;);})(); </span></pre></div> </td></tr></table>
bookmarklet, passwords