📄 teb.cpp
字号:
/*--------------------------------------------------------------
TEB.cpp -- 检测用户模式调试器(如OllyDbg)
(c) www.pediy.com code by 段钢, 2003.11
--------------------------------------------------------------*/
#include <windows.h>
BOOL IsDebug();
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,PSTR szCmdLine, int iCmdShow)
{
if( IsDebug() )
MessageBox(NULL,TEXT ("u are debugging me !"),TEXT ("OK"),MB_ICONEXCLAMATION);
else
MessageBox(NULL,TEXT ("not debugged!"),TEXT ("OK"),MB_ICONEXCLAMATION);
return 0;
}
//////////////////////////////////////////////////////////////////////
BOOL IsDebug()
{
_asm {
mov eax,fs:[30h]
movzx eax,byte ptr [eax+2h]
or al,al
jz nofound
}
return TRUE;
nofound:
return FALSE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -