⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 antispy.cpp

📁 此为本书的配套光盘.本书不但由浅入深地讲解了软件保护技术
💻 CPP
字号:
/********************************************************************

	Copyright (c) Beijing Feitian Technologies
	http://www.FTSafe.com

	File :		AntiSpy.cpp	

	Created:	2003/11/05

	Author:		yihai
	
	Purpose:	?

	Revision:	?

*********************************************************************/
// AntiSpy.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <Windows.h>
#include <conio.h>

int main(int argc, char* argv[])
{
	HWND hDesktop = GetDesktopWindow();
	HWND hWnd = GetWindow(hDesktop,GW_CHILD);
	bool bFound=false;

	while(hWnd)
	{		
		LONG lVal = GetWindowLong(hWnd,GWL_USERDATA);
				
		if(lVal == 0x12FEEB76)		
		{
			bFound = true;
			printf("SPY++ detected.\n");
			char szBuf[MAX_PATH];
			GetWindowText(hWnd,szBuf,MAX_PATH);
			printf("  %s (hWnd=0x%X)\n",szBuf,hWnd);

			//Crash SPYXX here if you want.
			/*	DWORD dwProcessId;
			GetWindowThreadProcessId(hWnd,&dwProcessId);
			DebugActiveProcess(dwProcessId);	*/
			getch();
		}
	
		hWnd = GetWindow(hWnd,GW_HWNDNEXT);
	}
	if(!bFound)
		printf("no SPY++\n");
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -