Advertisement
Quisqueite

stack_3

Feb 18th, 2018
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <unistd.h>
  3. #include <stdio.h>
  4. #include <string.h>
  5.  
  6. int main(int argc, char **argv)
  7. {
  8.   volatile int need_modificate;
  9.   char buffer[64];
  10.   char *variable;
  11.  
  12.   variable = getenv("UCAN");
  13.  
  14.   if(variable == NULL) {
  15.       errx(1, "Please set the UCAN environment variable\n");
  16.   }
  17.  
  18.   need_modificate = 0;
  19.  
  20.   strcpy(buffer, variable);
  21.  
  22.   if(need_modificate == 0x594f594f) {
  23.       printf("Win! You have did it!\n");
  24.   } else {
  25.       printf("Nope, try again, you got 0x%08x\n", need_modificate);
  26.   }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement