I have this part of code:
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
FILE * fp;
char * line = NULL;
size_t len = 0;
ssize_t read;
fp = fopen("./file_commands", "r");
if (fp == NULL)
exit(EXIT_FAILURE);
while ((read = getline(&line, &len, fp)) != -1) {
// printf("%s", line);
system(line);
}
fclose(fp);
if (line)
free(line);
exit(EXIT_SUCCESS);
}
In file_commands i want to put and be able to run a bash script like the following: \x31\xc0\x50\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80
what is the best way to do this?