Skip to content

Instantly share code, notes, and snippets.

@wraithgar

wraithgar/gen.js

Created Jul 7, 2020
Embed
What would you like to do?
quick and dirty password generator
'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('-'))
@bl-ue

This comment has been minimized.

Copy link

@bl-ue bl-ue commented Apr 26, 2021

You could also do something like replace s with $, o with 0, e with 3, etc..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment