more ctf stuff

This commit is contained in:
2025-09-20 21:10:36 +02:00
parent 443a793e6b
commit e0ed1e486b
92 changed files with 14630 additions and 7 deletions

View File

@@ -0,0 +1,33 @@
#include <stdio.h>
#include <stdlib.h>
// --------------------------------------------------- SETUP
void ignore_me_init_buffering() {
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stdin, NULL, _IONBF, 0);
setvbuf(stderr, NULL, _IONBF, 0);
}
// --------------------------------------------------- VULNERABLE FUNCTION
void win() { system("echo no cat /flag for you"); }
void vuln() {
char name[16];
printf("What is your name?\n");
gets(name);
printf("Hello %s!\nI have a present for you: %d\n", name, 0xc35f);
}
// --------------------------------------------------- MAIN
int main(int argc, char **argv) {
(void)argc;
(void)argv;
ignore_me_init_buffering();
vuln();
return 0;
}