【发布时间】:2019-12-11 00:37:06
【问题描述】:
所以我用作弊引擎在 TeamSpeak 3 中找到了我的 ping 静态地址。 地址是 "Qt5Gui.dll"+005F2E58 所以模块 Qt5Gui.dll + 偏移量 0x005F2E58
使用 Cheat Engine,重启应用后获取 ping 值不是问题。
现在我尝试使用内存函数在 C# 中找到这个地址,但我没有得到我的地址。
通缉地址是:16CE3AB92E40549592 我的程序得到我:14072403
如何像作弊引擎一样找到正确的地址?
我的 getModule 函数:
static IntPtr getModule(String processName, String moduleName)
{
Process[] ProcessList = Process.GetProcessesByName(processName);
IntPtr BaseAddress = IntPtr.Zero;
if (ProcessList.Length > 0)
{
Process process = ProcessList[0];
foreach (System.Diagnostics.ProcessModule Module in process.Modules)
{
if (Module.ModuleName.Contains(moduleName))
{
BaseAddress = Module.BaseAddress;
break;
}
}
}
return BaseAddress;
}
主要功能:
String process = "ts3client_win64";
IntPtr handle = getProcessHandle(process);
if (!handle.Equals(new IntPtr(1337)))
{
IntPtr qtGui = getModule(process, "Qt5Gui.dll");
int pingOffset = 0x005F2E58;
IntPtr pingAdress = IntPtr.Add(qtGui, pingOffset);
Int64 finalPingAdress = pingAdress.ToInt64();
MessageBox.Show("Ping Adress: " + finalPingAdress);
}
else
{
MessageBox.Show("Process Not Found!");
}
【问题讨论】:
-
你确定Cheat Engine中显示的地址是实际的当前地址吗?您是否单步执行代码以确保您正在查看正确的流程和模块?您也可以尝试在调试器中验证模块地址。到目前为止,您的代码没有明显的问题,而且两个地址完全不同(偏移量除外),所以我不确定我们能做些什么来帮助您。您是否尝试从目标进程读取内存?另外,你为什么期待
16CE3AB92E40549592?你应该得到0x16CE5116840(十进制的1567211219008)。