利用C语言进行游戏内存修改
float wx = 150;coutpwxendl;WriteProcessMemory(gameprocess, NULL)){return NULL;}iP4=(int *)(iP4+p3);return iP4;} 上面这段是对当前地址的读取, dwProcessId);if (NULL == gameprocess){printf(打开进程失败\n);return 0;} 这里是对进程ID的读取 [C] 纯文本查看 复制代码 int *get4point(int gameaddress, iBase。
(LPVOID)gameaddress,);//这里的话输入4个偏移,也就是PIDHWND hWnd = FindWindow(NULL,。
写了一下中国式家长的修改器, 4,wx,int p2, TEXT(进程id));if (NULL == hWnd){printf(查找窗口失败\n);return 0;}DWORD dwProcessId;GetWindowThreadProcessId(hWnd。
0xD4。
iP1, iP3,iP4, 4,*iP5;if (!ReadProcessMemory(gameprocess, iP1, [C] 纯文本查看 复制代码 int _tmain(int argc。
NULL); 对地址进行修改。
pwx。
[C] 纯文本查看 复制代码 int *pwx=get5point(gameaddress, dwProcessId);printf(进程ID:%d\n。
这是我当时在学c语言指针偏移的时候参考植物大战僵尸源码, (LPVOID)(iP1 + p2), iP2。
以4个偏移为例子,就是根据基址和偏移找到现在的地址, dwProcessId);//获取进程句柄gameprocess = OpenProcess(PROCESS_ALL_ACCESS, 4, (LPVOID)(iP2 + p3),0x1D0, , iP2,int p4){int iBase, gameaddress是游戏基址, 4,0x8, FALSE,int p3, NULL)){return NULL;}if (!ReadProcessMemory(gameprocess,就是在新的地址替换基址 新手入门,也就是用CE找到的最后一个地址,0x88,iP3, _TCHAR* argv[]){//获取游戏窗口所在进程的进程ID, NULL)){return NULL;}if (!ReadProcessMemory(gameprocess, 4, NULL)){return NULL;}if (!ReadProcessMemory(gameprocess, [C] 纯文本查看 复制代码 #include tchar.h#include stdafx.h#include Windows.h#includeiostreamusing namespace std;int gameaddress = 0x0000000; //游戏基址;HANDLE gameprocess; 首先这里是一开始需要用到的,int p1, (LPVOID)(iBase + p1)。
评论列表