C++常用HOOK开发|常用的头文件
// 基础标准库
#include <iostream> // 标准输入输出流
#include <string> // 字符串处理
#include <vector> // 动态数组
#include <map> // 映射/字典
#include <unordered_map> // 哈希映射(比map更快)
#include <set> // 集合
#include <unordered_set> // 哈希集合
#include <list> // 双向链表
#include <deque> // 双端队列
#include <queue> // 队列
#include <stack> // 栈
#include <array> // 固定大小数组
#include <bitset> // 位集合
#include <algorithm> // 算法库(如排序、查找等)
#include <numeric> // 数值算法
#include <cmath> // 数学函数
#include <random> // 随机数生成
#include <memory> // 智能指针
#include <thread> // 线程支持
#include <mutex> // 互斥锁
#include <condition_variable> // 条件变量
#include <future> // 异步操作
#include <atomic> // 原子操作
#include <chrono> // 时间相关功能
#include <functional> // 函数对象
#include <utility> // 实用工具(如pair)
#include <type_traits> // 类型特性
#include <limits> // 数值极限
#include <exception> // 异常处理
#include <stdexcept> // 标准异常
#include <cassert> // 断言
#include <cstdlib> // C标准库
#include <cstring> // C字符串操作
#include <cctype> // 字符类型判断
#include <ctime> // C时间函数
#include <filesystem> // 文件系统操作(C++17)
#include <regex> // 正则表达式
#include <sstream> // 字符串流
#include <iomanip> // 输入输出格式控制
// Windows API相关
#include <Windows.h> // Windows核心API
#include <TlHelp32.h> // 进程快照、模块枚举
#include <Psapi.h> // 进程状态API
#include <winternl.h> // Windows内部API
#include <processthreadsapi.h> // 进程线程API
#include <handleapi.h> // 句柄API
#include <errhandlingapi.h> // 错误处理API
#include <wow64apiset.h> // 32位/64位兼容API
#include <securitybaseapi.h> // 安全基础API
#include <synchapi.h> // 同步API
// 内存操作相关
#include <memoryapi.h> // 内存管理API
#include <heapapi.h> // 堆管理API
#include <minwinbase.h> // 基础内存结构
// 窗口操作相关
#include <winuser.h> // 用户界面API
#include <dwmapi.h> // 桌面窗口管理器API
#include <shellapi.h> // Shell API
#include <commctrl.h> // 通用控件
#pragma comment(lib, “dwmapi.lib”)
#pragma comment(lib, “comctl32.lib”)
// 输入模拟相关
#include <WinUser.h> // 键盘鼠标输入
#include <dinput.h> // DirectInput
#pragma comment(lib, “dinput8.lib”)
#pragma comment(lib, “dxguid.lib”)
// 钩子相关
#include <WinUser.h> // SetWindowsHookEx等钩子函数
#include <strsafe.h> // 安全字符串函数(钩子中常用)
// 注入相关
#include <libloaderapi.h> // LoadLibrary等函数
#include <processenv.h> // 进程环境API
#include <WinBase.h> // CreateRemoteThread等函数
// 调试相关
#include <DbgHelp.h> // 调试帮助库
#include <debugapi.h> // 调试API
#include <minidumpapiset.h> // 内存转储API
#pragma comment(lib, “dbghelp.lib”)
// 网络相关
#include <WinSock2.h> // Windows Socket API
#include <ws2tcpip.h> // TCP/IP协议
#include <iphlpapi.h> // IP帮助API
#include <netioapi.h> // 网络IO API
#include <mswsock.h> // Microsoft扩展Socket API
#pragma comment(lib, “ws2_32.lib”) // 链接Winsock库
#pragma comment(lib, “iphlpapi.lib”)
#pragma comment(lib, “mswsock.lib”)
// 图形相关
#include <gdiplus.h> // GDI+图形库
#include <wingdi.h> // GDI图形设备接口
#include <gdiplusflat.h> // GDI+平面API
#pragma comment(lib, “gdiplus.lib”) // 链接GDI+库
#pragma comment(lib, “gdi32.lib”)
// DirectX相关(游戏外挂常用)
#include <d3d9.h> // DirectX 9
#include <d3dx9.h> // DirectX 9扩展
#include <d3d11.h> // DirectX 11
#include <d3dx11.h> // DirectX 11扩展
#include <dxgi.h> // DirectX图形接口
#include <d3dcompiler.h> // DirectX着色器编译器
#pragma comment(lib, “d3d9.lib”)
#pragma comment(lib, “d3dx9.lib”)
#pragma comment(lib, “d3d11.lib”)
#pragma comment(lib, “dxgi.lib”)
#pragma comment(lib, “d3dcompiler.lib”)
// OpenGL相关
#include <gl/GL.h> // OpenGL核心
#include <gl/GLU.h> // OpenGL实用工具库
#pragma comment(lib, “opengl32.lib”)
#pragma comment(lib, “glu32.lib”)
// 加密解密相关
#include <wincrypt.h> // Windows加密API
#include <bcrypt.h> // 加密原语API
#include <ncrypt.h> // 密钥存储API
#pragma comment(lib, “crypt32.lib”)
#pragma comment(lib, “bcrypt.lib”)
#pragma comment(lib, “ncrypt.lib”)
// 文件操作相关
#include <fileapi.h> // 文件API
#include <fstream> // 文件流
#include <shlwapi.h> // Shell轻量级API(文件路径操作)
#include <pathcch.h> // 路径规范化API
#include <io.h> // 低级IO
#include <direct.h> // 目录操作
#pragma comment(lib, “shlwapi.lib”)
#pragma comment(lib, “pathcch.lib”)
// 注册表操作
#include <winreg.h> // 注册表API
#include <shlobj.h> // Shell对象(常与注册表配合使用)
#pragma comment(lib, “shell32.lib”)
// 系统信息
#include <sysinfoapi.h> // 系统信息API
#include <powerbase.h> // 电源管理API
#include <winnt.h> // NT API定义
#include <winbase.h> // 基础API
#include <versionhelpers.h> // 版本帮助函数
#include <VersionApi.h> // 版本API
// 常用的第三方库(需要额外安装)
// #include <detours.h> // Microsoft Detours库(Hook API)
// #include <minhook.h> // MinHook(轻量级Hook库)
// #include <imgui.h> // Dear ImGui(界面库)
// #include <curl/curl.h> // libcurl(网络请求)
// #include <json/json.h> // jsoncpp(JSON解析)
// #include <nlohmann/json.hpp> // JSON for Modern C++(更现代的JSON库)
// #include <opencv2/opencv.hpp> // OpenCV(图像处理)
// #include <boost/asio.hpp> // Boost.Asio(网络编程)
// #include <boost/algorithm/string.hpp> // Boost字符串算法
// #include <boost/thread.hpp> // Boost线程库
// #include <cryptopp/aes.h> // Crypto++(加密库)
// #include <cryptopp/modes.h> // Crypto++加密模式
// #include <zlib.h> // zlib(压缩库)
// #include <sqlite3.h> // SQLite(嵌入式数据库)
// #include <fmt/format.h> // {fmt}(现代格式化库)
// #include <spdlog/spdlog.h> // spdlog(日志库)
// #include <cereal/archives/binary.hpp> // cereal(序列化库)
// #include <glm/glm.hpp> // OpenGL数学库
// #include <lua.hpp> // Lua脚本引擎
// #include <sol/sol.hpp> // Sol2(Lua C++绑定)
// #include <pybind11/pybind11.h> // Python绑定
// #include <enet/enet.h> // ENet(可靠UDP网络库)
// #include <discord_rpc.h> // Discord RPC
// #include <vulkan/vulkan.h> // Vulkan图形API
// 游戏引擎相关
// #include <UnrealEngine.h> // 虚幻引擎
// #include <Unity/IUnityInterface.h> // Unity引擎
// 反调试/反反调试相关
#include <winternl.h> // 内部NT API(反调试常用)
/*
常见外挂功能对应的库:
1. 内存读写: Windows.h, TlHelp32.h, memoryapi.h
2. 进程操作: Windows.h, TlHelp32.h, Psapi.h, processthreadsapi.h
3. 窗口操作: Windows.h, winuser.h, dwmapi.h
4. 键鼠模拟: Windows.h, WinUser.h, dinput.h
5. 钩子技术: Windows.h, WinUser.h, detours.h/minhook.h
6. DLL注入: Windows.h, libloaderapi.h, WinBase.h
7. 绘制界面: d3d9.h, d3d11.h, imgui.h, gdiplus.h
8. 网络通信: WinSock2.h, ws2tcpip.h, boost/asio.hpp
9. 图像识别: opencv2/opencv.hpp
10. 加密解密: wincrypt.h, bcrypt.h, cryptopp/*
11. 反调试: winternl.h
12. 数据序列化: cereal/*, nlohmann/json.hpp
13. 日志记录: spdlog/spdlog.h
14. 脚本引擎: lua.hpp, sol/sol.hpp, pybind11/pybind11.h
*/
/*
外挂开发常用技术对应的库:
1. 内存扫描: Windows.h, TlHelp32.h, memoryapi.h
2. 特征码搜索: Windows.h, algorithm, vector
3. 内联汇编: <intrin.h>
4. 远程线程注入: Windows.h, processthreadsapi.h
5. IAT/EAT钩子: Windows.h, winnt.h, detours.h
6. 内联钩子: detours.h, minhook.h
7. 虚表钩子: Windows.h, memory
8. D3D钩子: d3d9.h, d3d11.h
9. 窗口覆盖: Windows.h, winuser.h, gdiplus.h
10. 驱动开发: <ntddk.h>, <wdm.h> (需要WDK)
*/
声明:本站所有文章,如无特殊说明或标注,均为来自互联网。建议您下载文件后,对该文件进行一次病毒扫描查杀以确保该资源的安全性,包括但不限于(360、金山、腾讯杀毒、瑞星、火绒)等等杀毒软件,如未按本站要求进行以上操作,发生的风险由用户自行承担。资源是否有描述中确切的作用或实际效果本站并不知情,用户可自行斟酌使用,本站只提供一个ALaN.ShaRe资源学习分享平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
*凡以任何方式登陆本网站或直接、间接使用本站资料者,均应仔细阅读本申明,一旦使用本站任何教程和资源即被视为您已接受本站的免责申明。
ALaN.ShaRe资源网 - QQ群:237941779 » C++常用HOOK开发|常用的头文件
ALaN.ShaRe资源网 - QQ群:237941779 » C++常用HOOK开发|常用的头文件