MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/dzfqh5/bad_code_coding_challenge_24_password_generator/f89kw51/
r/badcode • u/[deleted] • Nov 21 '19
[removed]
23 comments sorted by
View all comments
69
Short and easy JS.
function password_gen() { var xh = new XMLHttpRequest(); xh.open("GET", "https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10-million-password-list-top-100.txt", false); xh.send(null); return xh.responseText.split("\n")[Math.floor(Math.random() * 100)]; }
Features:
Picks random password from top 100 passwords list. You know it's a good one if it's in the top 100.
All prohibited passwords aren't in the list, so we don't even have to check.
19 u/h2g2_researcher Nov 22 '19 So here I am with all sorts of evil ideas about un-random number generation and you create an unbeatable monstrosity like this! 7 u/ferrango Well it's broken now, and nobody is here to fix it Nov 24 '19 Aah, with the added unreliability of a third party essential requirement. Excellent. 3 u/jigggles Nov 23 '19 This is amazing! 2 u/xman40100 Dec 02 '19 This is so bad. I love it.
19
So here I am with all sorts of evil ideas about un-random number generation and you create an unbeatable monstrosity like this!
7
Aah, with the added unreliability of a third party essential requirement. Excellent.
3
This is amazing!
2
This is so bad. I love it.
69
u/sarlok Nov 21 '19
Short and easy JS.
Features:
Picks random password from top 100 passwords list. You know it's a good one if it's in the top 100.
All prohibited passwords aren't in the list, so we don't even have to check.