write_memory
Writes hex-encoded bytes to a specified game process memory address, blocking writes to hooked function entries unless force is enabled.
Instructions
写游戏进程内存。
⚠️ 危险操作:写错地址会立刻崩溃游戏。 写之前务必先用 read_memory 确认地址内容符合预期。 建议只改浮点数/整数这类简单值,并先备份原值。
不要写已装 Hook 的函数入口:Frida 的 Interceptor 拥有那几字节
(它在那里写了跳转指令),绕过它直接 Memory.protect + 写同一块内存,
哪怕写回刚读到的同样字节,也会在数秒内让游戏崩溃 ——
实测两次:Windows 事件日志里是 GameAssembly.dll 在该方法 RVA 处的
0xc0000005;同样操作写在模块头(base)上则完全无害且能原样读回。
本工具默认拒绝这种写入;确实要写请传 force=True,
或者先 unhook 再写。
Args: address: 地址(十六进制)。 hex_data: 要写入的字节,十六进制串(如 "0000803f" 表示 float 1.0)。 force: 明知目标被 Hook 覆盖仍要写(默认 False = 拒绝)。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | ||
| address | Yes | ||
| hex_data | Yes |