This commit is contained in:
2026-01-05 03:42:05 +01:00
parent 26e0102f58
commit a16c96b643
8 changed files with 87 additions and 0 deletions

1
4/level2/flag.txt Normal file
View File

@@ -0,0 +1 @@
hacklab{thanks_mario_but_the_flag_is_on_another_server}

BIN
4/level2/level2 Executable file

Binary file not shown.

22
4/level2/level2.c Normal file
View File

@@ -0,0 +1,22 @@
// gcc -o level2 -no-pie -fno-stack-protector level2.c
#include <stdio.h>
#include <unistd.h>
void win() {
char *argv[2];
argv[0] = "/bin/sh";
argv[1] = NULL;
execve(argv[0], argv, NULL);
}
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;
}