test
来源:互联网 发布:.cn域名 编辑:程序博客网 时间:2024/05/16 05:38
#include <stdio.h>
__inline int idtCheck ()
...{
unsigned char m[6];
__asm sidt m;
printf("IDTR: %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x ", m[0], m[1], m[2], m[3], m[4], m[5]);
return (m[5]>0xd0) ? 1 : 0;
}
int gdtCheck()
...{
unsigned char m[6];
__asm sgdt m;
printf("GDTR: %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x ", m[0], m[1], m[2], m[3], m[4], m[5]);
return (m[5]>0xd0) ? 1 : 0;
}
int ldtCheck()
...{
unsigned char m[6];
__asm sldt m;
printf("LDTR: %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x ", m[0], m[1], m[2], m[3], m[4], m[5]);
return (m[0] != 0x00 && m[1] != 0x00) ? 1 : 0;
}
int main(int argc, char * argv[])
...{
idtCheck();
gdtCheck();
if (ldtCheck())
printf("Virtual Machine detected. ");
else
printf("Native machine detected. ");
return 0;
}
__inline int idtCheck ()
...{
unsigned char m[6];
__asm sidt m;
printf("IDTR: %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x ", m[0], m[1], m[2], m[3], m[4], m[5]);
return (m[5]>0xd0) ? 1 : 0;
}
int gdtCheck()
...{
unsigned char m[6];
__asm sgdt m;
printf("GDTR: %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x ", m[0], m[1], m[2], m[3], m[4], m[5]);
return (m[5]>0xd0) ? 1 : 0;
}
int ldtCheck()
...{
unsigned char m[6];
__asm sldt m;
printf("LDTR: %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x ", m[0], m[1], m[2], m[3], m[4], m[5]);
return (m[0] != 0x00 && m[1] != 0x00) ? 1 : 0;
}
int main(int argc, char * argv[])
...{
idtCheck();
gdtCheck();
if (ldtCheck())
printf("Virtual Machine detected. ");
else
printf("Native machine detected. ");
return 0;
}
- test
- test
- test
- test
- test
- test
- test
- Test
- test
- Test
- test
- test
- test
- test
- test
- test
- test
- Test
- iis6启动HTTP压缩的方法
- Sharepoint Server与Reporting Services整合配置图解
- Sharepoint Server与Reporting Services整合配置图解(转)
- 几个学习英语的好网站
- JAVA设计模式
- test
- SharePoint 2007部署过程详细图解(上)— 前期环境搭建
- Linux下硬盤格式化
- 怎么设计自己的模块
- SharePoint 2007部署过程详细图解(中)
- SharePoint 2007部署过程详细图解(下)
- AJAX+struts实现无刷新分页
- tell him more about myself
- java.sql.SQLException: ORA-00600: 内部错误代码,参数: [ttcgcshnd-1], [0], [], [], [], [], [], []解决办法