一、跨进程注入代码
#include #includeDWORD 获取PID(){ 外挂 char 窗口标题[] = \”E:CodeC testtestDebugtest123.exe\”; HWND 窗口句CF外挂卡盟柄 = FindWindowA(0, 窗口标题); DWORD pid = 0, tid = 0; tid = GetWindowThreadProcessId(窗口句柄, &pid); // a&b return pid;}void 调用吃苹果(int 参数1){ DWORD pid = 获取PID(); printf(\”pid=%d r\”, pid); HANDLE 进程句柄 = OpenProcess(PROCESS_ALL_ACCESS, 0, pid); CreateRemoteThread(进程句柄,0,0, (LPTHREAD_START_ROUTINE)0xE81366,(LPVOID)参数1,0,0); CloseHandle(进程句柄);}int main(){ 调用吃苹果(100); std::cout << \"Hello World!\"; return 1;}
二、项目下载地址:
关注公众号:回复20220425