一、跨进程注入代码
#include <iostream>#include<Windows.h>DWORD 获取PID(){ char 窗口标题[] = "E:CodeC testtestDebugtest123.exe"; HWND 窗口句柄 = FindWindowA(0, 窗口标题); DWORD pid = 0, tid = 0; tid = GetWindowThreadProcessId(窗口句柄, &p英雄联盟脚本id); // a&b return pid;}void 调用吃和平精英卡盟苹果(int 参数1){ DWORD pid = 获取PID(); printf("pid=%d rn", 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!n"; return 1;}
二、项目下载地址:
关注公众号:回复20220425