#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

char string[100];

void exec_string() {
    system(string);
}

void add_bin(int magic) {
    if (magic == 0xdeadbeef) {
        strcat(string, "/bin");
    }
}

void add_bash(int magic1, int magic2) {
    if (magic1 == 0xcafebabe && magic2 == 0x0badf00d) {
        strcat(string, "/bash");
    }
}

void vulnerable_function() {
    char buffer[100];
    read(0, buffer, 400);
}

int main() {
    setbuf(stdout, NULL);
    setbuf(stdin, NULL);
    setbuf(stderr, NULL);
    string[0] = 0;
    vulnerable_function();
    return 0;
}
