Files
reverse_shell_shell/cmd/shell.c
2021-10-23 01:36:55 -04:00

24 lines
361 B
C

#include <stdio.h>
#include <stdlib.h>
#include "cmd_utils.h"
#define clear() printf("\033[H\033[J")
int main() {
int status_return = 0;
char *cmd;
char **args;
init_shell();
do {
cmd = read_input();
args = split_cmd(cmd);
status_return = reverse_execute(args);
free(cmd);
free(args);
} while(status_return != 255);
return EXIT_SUCCESS;
}