Binary Gauntlet 0
Problem
Solution
undefined8 main(void) { char local_88 [108]; __gid_t local_1c; FILE *local_18; char *local_10; local_10 = (char *)malloc(1000); local_18 = fopen("flag.txt","r"); if (local_18 == (FILE *)0x0) { puts( "Flag File is Missing. Problem is Misconfigured, please contact an Admin if you are runningthis on the shell server." ); /* WARNING: Subroutine does not return */ exit(0); } fgets(flag,0x40,local_18); signal(0xb,sigsegv_handler); local_1c = getegid(); setresgid(local_1c,local_1c,local_1c); fgets(local_10,1000,stdin); local_10[999] = '\0'; printf(local_10); fflush(stdout); fgets(local_10,1000,stdin); local_10[999] = '\0'; strcpy(local_88,local_10); return 0; }void sigsegv_handler(void) { fprintf(stderr,"%s\n",flag); fflush(stderr); /* WARNING: Subroutine does not return */ exit(1); }
Flag
Last updated