Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //http://waleedassar.blogspot.com
- //http://www.twitter.com/waleedassar
- //Works against OllyDbg v1.10
- #include "stdafx.h"
- #include "windows.h"
- #include "stdio.h"
- int _cdecl Handler(EXCEPTION_RECORD* pRec,void* Est_Frame,unsigned char* pContext,void* Disp)
- {
- printf("Exception %x Caught\r\n",pRec->ExceptionCode);
- ExitProcess(0);
- return ExceptionContinueSearch;
- }
- int main()
- {
- __asm
- {
- push offset Handler
- push dword ptr fs:[0x0]
- mov dword ptr fs:[0x0],esp
- }
- RaiseException(0x4000001f,0,0,0);
- printf("Debugger detected!\r\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement