On 4/21/2018 5:20 PM, Brian wrote:
On Fri 20 Apr 2018 at 17:07:10 -0700, David Christensen wrote:
On 04/20/18 12:38, Brian wrote:
T have a script. It contains an important password.
I have encrypted the script with
scrypt dec -t 10 /usr/local/bin/myscript
Looking at:
http://manpages.org/scrypt
That command decrypts /usr/local/bin/myscript (and I don't know if the -t
option is valid for decryption).
A typo. It should be "enc", not "dec".
I can, of course, decrypt it with
scrypt dec /usr/local/bin/myscript
Assuming /usr/local/bin/myscript is ciphertext, that command will print the
script on STDOUT.
Another bit of sloppiness. Redirection to a file should have been
mentioned.
As scrypt is going to prompt you for a passphrase anyway, why don't you
leave the script unencrypted and revise it to prompt for the "important
password"?
Here's the code I used to let a script prompt for a password:
read -s -p "Enter password: "
[ $? -ne 0 ] && exit 1
--
John Doe