虚拟机检测

#include <Windows.h>
#include <stdio.h>

void main()
{
byte lpTest[]={"\x8b\x4c\x24\x04\x0f\x01\x09\xc3"};
byte lpbutter[MAX_PATH]={0};
CallWindowProcW((WNDPROC)&lpTest,(HWND)&lpbutter,0,0,0);

if (lpbutter[5]>0xd0)
{
printf("虚拟机");
}
else
{
printf("是真实机器");
}
getchar();
}
posted @ 2012-01-09 19:54  Y4ng  阅读(505)  评论(0编辑  收藏  举报