Created
October 30, 2013 10:03
-
-
Save trietptm/7230008 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
char flag[] = "not_the_real_flag"; | |
int main(int argc, char *argv[]) { | |
int data = 0xdeadbeef; | |
char buf[1024]; | |
printf("What's your name? "); | |
fflush(stdout); | |
gets(buf); | |
printf("Hi %s\n", buf); | |
fflush(stdout); | |
if (data != 0xdeadbeef) { | |
printf("How did this happen? Here is your flag: \"%s\"\n", flag); | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment