This commit is contained in:
2026-01-06 08:31:18 +01:00
parent 88e79d5b14
commit 9019369b0d
4 changed files with 20 additions and 0 deletions

19
4/level4/level4.c Normal file
View File

@@ -0,0 +1,19 @@
// gcc -o level4 -no-pie -fno-stack-protector level4.c
#include <stdio.h>
#include <stdlib.h>
const char command[] = "/bin/sh";
void win(const char *cmd) { system(cmd); }
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);
puts("Bye.");
return 0;
}