How do I run a command from a base64 encoded string in bash?
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?
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
.