Guest User

Untitled

a guest
Feb 21st, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdio.h>
  3. #include <windows.h>
  4. #include <stdlib.h>
  5. #include <signal.h>
  6.  
  7.  
  8. int memento()
  9. {
  10. int a=0;
  11. MessageBoxA(NULL,"Memento mori","POSIX Signal",NULL);
  12. return 0;
  13. }
  14. void fall()
  15. {
  16. int* p = 0x00000000;
  17. *p = 13;
  18. }
  19. void posix_death_signal(int signum)
  20. {
  21. memento();
  22. signal(signum, SIG_DFL);
  23. exit(3);
  24. }
  25.  
  26.  
  27. int main(int argc, char *argv[])
  28. {
  29. signal(SIGSEGV, posix_death_signal);
  30. fall();
  31. }
Add Comment
Please, Sign In to add comment