0

I have encrypted my shell script with openssl. Now i am using it with decrytion like

openssl enc -d -aes-256-cbc -a -in encryptedshell.sh |sh - 

After running this command system asks for password.Now I am trying to autofill password by EOF like

pass=abc
openssl enc -d -aes-256-cbc -a -in encryptedshell.sh |sh -  <<EOF 
pass $pass

Whether it is possible ?

0
openssl enc -d -aes-256-cbc -a -in encrypted-shell.sh -pass pass:mypassword |sh -
| improve this answer | |
  • This appears to be the same command that you mentioned in the question, how does this answer your question? – Kusalananda Feb 27 at 6:49
0

Try the yes utility. You can use like this:

$ yes [your-password] | openssl-command

Best regards.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.