#include #include void getFlag(); int main(int argc, char **argv){ int offset = 0; char buffer[16] = "0123456789abcdef"; setbuf(stdout, NULL); // turn off output buffering printf("What's the typical max weight of an Atlantic canary? "); fgets(buffer, 512, stdin); offset = atoi(buffer); printf("Here's a hint: %lx\n", *(unsigned long*)(buffer+offset)); printf("Please don't overwrite my stack!\n"); fgets(buffer, 512, stdin); return 0; } void getFlag() { if(getenv("TASK_NAME")) { system("python ctf.py success"); exit(0); } else { printf("Success!"); exit(0); } }