Skip to content

Instantly share code, notes, and snippets.

@dwallraff
Last active October 27, 2022 01:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dwallraff/cc5c89468281903b5180a3ef2bd97a1a to your computer and use it in GitHub Desktop.
Save dwallraff/cc5c89468281903b5180a3ef2bd97a1a to your computer and use it in GitHub Desktop.
Generate random passwords with urandom
cat /dev/urandom | tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?=' | fold -w 32 | head -n 5
# cat /dev/urandom | tr -dc 'a-zA-Z0-9._!@#$%^&*()' | fold -w 8 | head -n 500000 > wordlist.txt
# cat /dev/urandom | tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?=' | fold -w 12 | head -n 4
# cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
# cat /dev/urandom | base64 | tr -d '[^:alnum:]' | cut -c1-10 | head -2
# cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 4
# cat /dev/urandom| tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?='|fold -w 12| head -n 4| grep -i '[!@#$%^&*()_+{}|:<>?=]'
# < /dev/urandom tr -dc '[:print:]' |fold -w 10| head -n 10
# tr -cd '[:alnum:]' < /dev/urandom | fold -w30 | head -n2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment