声明:此软部分代码非原创 。
先送上软件
PlantsVsZombiesTool.rar
8.01KB
RAR
34次下载
不能出售呢~好可惜。
注释:此软通过读取软件进程数据来达成修改软件内部指令的目的(PvZ是修改程序指令大神的好去处)运行期间的截图
开源:
Option Explicit
Private Declare Function ReadProcessMemory _
Lib "Kernel32.dll" (ByVal hProcess As Long, _
ByRef lpBaseAddress As Any, _
ByRef lpBuffer As Any, _
ByVal nSize As Long, _
ByRef lpNumberOfBytesWritten As Long) As Long
Private Declare Function WriteProcessMemory _
Lib "Kernel32.dll" (ByVal hProcess As Long, _
ByRef lpBaseAddress As Any, _
ByRef lpBuffer As Any, _
ByVal nSize As Long, _
ByRef lpNumberOfBytesWritten As Long) As Long
Private Declare Function OpenProcess _
Lib "Kernel32.dll" (ByVal dwDesiredAccess As Long, _
ByVal bInheritHandle As Long, _
ByVal dwProcessId As Long) As Long
Private Declare Function CloseHandle Lib "Kernel32.dll" (ByVal hObject As Long) As Long
Private Const baseAddress As Long = &H6A9EC0
Private Const processName As String = "[s:9]lantsVsZombies.exe"
这段不解释,主要是定义和读取这段是金钱无限的工具代码,是点击cmdButton1的结果这段是阳光无限的工具代码,是点击cmdButton2的结果
接下来是关键部分代码:
Private Sub WriteMemoryValue(ByVal baseAddress As Long, ByVal value As Long)
Dim hProcess As Long
hProcess = OpenProcess(&H1F0FFF, 0, GetPid)
WriteProcessMemory hProcess, ByVal baseAddress, value, 4, 0&
CloseHandle hProcess
End Sub
Private Function ReadMemoryValue(ByVal Address As Long) As Long
Dim hProcess As Long
Dim buffer As Long
hProcess = OpenProcess(&H1F0FFF, 0, GetPid)
ReadProcessMemory hProcess, ByVal Address, ByVal VarPtr(buffer), 4, 0&
CloseHandle hProcess
ReadMemoryValue = buffer
End Function
首先获取PID,从而介入进程最后是Timer代码任务完成~这个是SoSbLab暑假任务的作品,Cqb98来看看
200字以内,仅用于支线交流,主线讨论请采用回复功能。