PSI/prog_vulnerable.c
Faure Paul dd7370c784 Clean
2022-06-27 21:48:52 +02:00

38 lines
618 B
C

int read_array() {
int my_array[5] = {0,0,0,0,0};
print("Please enter \na value:\n");
int val = get();
int i = 1;
while (i<8) {
tab[5-i] = val;
i = i + 1;
}
}
int you_have_been_hacked() {
print("\0\n\nYOU'VE BEEN HACKED\n\n");
print(" (__)\n");
print(" (|) (00)\n");
print(" |--(__) \n");
print(" | _| _|\__/\n\n");
print(" Yark Yark Yark");
while (1) {
}
}
int legitimate_function() {
print("Legitimate function\n");
}
int main() {
print("Program begin\n\n");
int a = 0;
int b = 0;
read_array();
legitimate_function();
print("a=");
print(a);
print("\n");
}