Skip to content

Instantly share code, notes, and snippets.

@aweimeow
Created October 31, 2014 06:29
Show Gist options
  • Save aweimeow/03043db97276e0257487 to your computer and use it in GitHub Desktop.
Save aweimeow/03043db97276e0257487 to your computer and use it in GitHub Desktop.
#include<stdio.h>
#include<string.h>
int main() {
int flag=0;
char buf[20];
char * point= (char *) &flag;
fprintf(stderr,"How can you write on flag?\n");
fgets(buf,20,stdin);
fprintf(stderr,"Your input is ");
fprintf(stderr,"\n");
if(flag == -1) {
fprintf(stderr,"Good job.\n");
fprintf(stderr,"Your checkin key is.....");
system("/checkin");
}
else {
fprintf(stderr,"flag = %d Sorry....\n",flag);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment