Created
July 7, 2020 18:00
-
-
Save wraithgar/58341e23d0a0f29f18ab591246f29d74 to your computer and use it in GitHub Desktop.
quick and dirty password generator
This file contains 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
'use strict' | |
const fs = require('fs') | |
const words = fs.readFileSync('/usr/share/dict/words', 'utf8').split('\n') | |
const passwords = [] | |
for (let i = 0; i < 12; i++) { | |
const randomNumber = Math.floor(Math.random() * words.length) | |
passwords.push(words[randomNumber]) | |
} | |
console.log(passwords.join('-')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could also do something like replace
s
with$
,o
with0
,e
with3
, etc..