Skip to content

Instantly share code, notes, and snippets.

@rojenzaman
Last active July 9, 2020 17:31
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