Skip to content

Instantly share code, notes, and snippets.

@Orestad
Last active November 20, 2015 13:17
Password generator - just input word list. Usage (in Swedish): http://orestad-linux.se/?p=600
#!/bin/bash
# Simple password generator
# Written by daemonicus666
###########################
mydict=(`cat wordlist`)
N=$1
echo ""
echo "Your new password is:"
for index in `shuf --input-range=0-$(( ${#mydict[*]} - 1 )) | head -${N}`;
do
printf "${mydict[$index]}"
done
printf "\n"
printf "\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment