Created
June 18, 2015 10:04
-
-
Save evernick/07331174a4f66137dde9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <excpt.h> | |
#include <stdio.h> | |
LONG WINAPI UnhandledExcepFilter(PEXCEPTION_POINTERS pExcepPointers) | |
{ | |
SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER) | |
pExcepPointers->ContextRecord->Eax); | |
pExcepPointers->ContextRecord->Eip += 2; | |
return EXCEPTION_CONTINUE_EXECUTION; | |
} | |
int main(int argc, char **argv) | |
{ | |
SetUnhandledExceptionFilter(UnhandledExcepFilter); | |
__asm{xor eax, eax} | |
__asm{div eax} | |
printf("No Debugger...\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment