frida_interceptor_replace
Replace a native function's implementation entirely in a target process by specifying its memory address and providing JavaScript callback code. Optionally revert after a set time.
Instructions
Replace a native function entirely using Interceptor.replace.
Unlike intercept (which logs), this replaces the implementation.
target: process name or pid (string).
function_addr: hex address of the function to replace.
replacement_js: JS code returning a NativeCallback.
revert_after: auto-revert after N seconds (0 = keep forever).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target": "<target>",
"function_addr": "<function_addr>",
"replacement_js": "<replacement_js>"
},
"name": "frida_interceptor_replace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | ||
| function_addr | Yes | ||
| replacement_js | Yes | ||
| revert_after | No |