-
-
Save spnow/520284f1d5e8bde1a9047af0bb2371e5 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