Skip to content

Instantly share code, notes, and snippets.

@rojenzaman
Last active July 9, 2020 17:31
Show Gist options
  • Save rojenzaman/7fd6bf6bcbf7636f38209a87fbb50950 to your computer and use it in GitHub Desktop.
Save rojenzaman/7fd6bf6bcbf7636f38209a87fbb50950 to your computer and use it in GitHub Desktop.
Password Generator Bash (Very Simple)
#!/bin/bash
if [ "$#" -lt 1 ]; then
echo "`basename $0` <8-92>";
exit 1;
fi
PASS=`date +%s | sha256sum | base64 | head -c $1`
echo "$PASS";
@rojenzaman
Copy link
Author

rojenzaman commented Jul 9, 2020

usage

$ gen_pass.sh <8-92>

example

$ gen_pass.sh 32
MjljZGFhZmY5NzE5NDFmOWZhOTc4MjA3

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