-
-
Save wal-f/71d2abc53ab09ef96510 to your computer and use it in GitHub Desktop.
Password generator bookmarklet. Can set length (default's 20) and whether to include special characters, per use. Option to regen if not happy with output. Ideal for use with password managers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var%20c=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9'],l=prompt('Password%20length?',20),p;if(!l)return;if(isNaN(l=parseInt(l))||l<1){alert('Invalid%20length');return}if(confirm('Special%20characters?'))Array.prototype.push.apply(c,['!','@','#','$','%','^','&','*','(',')','-','_','=','+','[','{',']','}','\\','|',';',':',"'",'"',',','<','.','>','/','?','`','~']);do{p='';while(p.length<l)p+=c[Math.floor(Math.random()*c.length)]}while(prompt('Copy%20and%20OK,%20or%20cancel%20for%20new%20one',p)==null)})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment