Sometimes it is convenient to have a simple command that will print a few credentials to the shell (certificate passwords, ZIP archives, etc.). When I run the command below in the terminal, a small modal window pops up asking me to unlock my login keychain. The script then fetches the password to decrypt the contents of the file to stdout
.
To transform a file conf.txt
into this self extracting file, first encrypt it with Blowfish (or the more standard aes-256-cbc instaead of bf)
openssl bf -e -salt -a -in conf.txt -out econf.txt
You will be asked for a password twice on the command line.