Advertisement
LuanProRobloxianScri

Untitled

Sep 18th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. /*
  5. gcc -m32 -o ch13 ch13.c -fno-stack-protector
  6. */
  7.  
  8.  
  9. int main()
  10. {
  11.  
  12. int var;
  13. int check = 0x04030201;
  14. char buf[40];
  15.  
  16. fgets(buf,45,stdin);
  17.  
  18. printf("\n[buf]: %s\n", buf);
  19. printf("[check] %p\n", check);
  20.  
  21. if ((check != 0x04030201) && (check != 0xdeadbeef))
  22. printf ("\nYou are on the right way !\n");
  23.  
  24. if (check == 0xdeadbeef)
  25. {
  26. printf("Yeah dude ! You win !\n");
  27. system("/bin/dash");
  28. }
  29. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement