Skip to content

Instantly share code, notes, and snippets.

@Orestad
Last active November 20, 2015 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Orestad/7894e714c27b56f0b6a2 to your computer and use it in GitHub Desktop.
Save Orestad/7894e714c27b56f0b6a2 to your computer and use it in GitHub Desktop.
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