2

I would like to run a command from a base64 encoded string in bash. For example bHMgLWwgLwo= would be equal to ls -l. How do I do this?

7

You can run a base64 encoded string in bash by piping the output of the base64 package for coreutils to bash. For example the command base64 -D <<< bHMgLWwgLwo= | sh would run the command ls -l.

| improve this answer | |
  • on my version the option is -d – A.B Feb 11 '18 at 10:15

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.