1
I understand your question, but in my opinion your approach is wrong.
I can not see your image and also Oce did not quote the programming language, but this was already a doubt of mine and I will record here an answer to who it may interest if the language is C or C++.
No scripts are created on executables, if system calls are used to directly execute commands.
For this there are some alternatives, the simplest is to use within the executable a call to system()
.
A banal example would be:
#include <stdlib.h>
int main (int argc, char *argv[])
{
system(argv[1]);
return 0;
}
Try passing some argument to the executable, example:
./binario "ls -l"
There are also other calls that do this with the use of popen()
and pclose()
, depend solely on the stdio.h
.