Created
April 22, 2021 16:26
-
-
Save jecxjo/c8f55aeb43d7c59033fb312b98003e8e to your computer and use it in GitHub Desktop.
Secure Shell Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
usage() { | |
cat <<EOF | |
USAGE: sss.sh <script> [<args>] | |
To encrypt file you'll need openssl cli | |
$ openssl aes-256-cbc -a -salt -in <script> -out <enc script> | |
Can optionally add "#!/usr/bin/env sss.sh" to make file directly executable. | |
EOF | |
} | |
if [ $# -eq 0 ]; then | |
usage | |
exit 1 | |
fi | |
SCRIPT=$1 | |
shift | |
openssl aes-256-cbc -d -a -salt -in "$SCRIPT" 2>/dev/null | bash -s $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment