This commit is contained in:
2026-01-06 10:49:56 +01:00
parent 9019369b0d
commit c823836626
7 changed files with 50 additions and 0 deletions

17
4/level5/level5.c Normal file
View File

@@ -0,0 +1,17 @@
// gcc -o level5 -no-pie -fno-stack-protector level5.c
#include <stdio.h>
#include <stdlib.h>
char command[] = "/bin/sh";
int main(int argc, char **argv) {
// Disable output buffering. Not part of the challenge.
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stdin, NULL, _IONBF, 0);
char buffer[32];
puts("What do you want to talk about?");
fgets(buffer, 320, stdin);
system("echo Bye.");
return 0;
}