Advertisement
Quisqueite

stack_2

Feb 18th, 2018
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 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.  
  11.   if(argc == 1) {
  12.       errx(1, "Please specify an argument\n");
  13.   }
  14.  
  15.   need_modificate = 0;
  16.   strcpy(buffer, argv[1]);
  17.  
  18.   if(need_modificate == 0x5543414e) {
  19.       printf("Win! You have did it!\n");
  20.   } else {
  21.       printf("Nope, try again, you got 0x%08x\n", need_modificate);
  22.   }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement