hook_jsvmp_interpreter
Install a JSVMP runtime probe to intercept JavaScript interpreter calls, property access, and timing APIs. Supports proxy or transparent modes for bypassing bot detection.
Instructions
Install a JSVMP runtime probe.
Multi-path instrumentation for JSVMP interpreters. Wraps Reflect.get/apply, installs Proxies on globals (navigator, screen, etc.), intercepts timing APIs.
LIMITATIONS: "proxy" mode is DETECTABLE by RS/AK-style signature-based anti-bot. For those, use instrumentation(action='install') (source-level rewrite) or mode='transparent' instead.
IMPORTANT — timing for sync-loaded SDKs (e.g. webmssdk): JSVMP interpreters capture native references at startup via closures. If you install hooks AFTER the SDK has loaded, the SDK's closures already hold the original (un-hooked) references — your hooks will never fire. You MUST install hooks BEFORE navigate(): 1. launch_browser() 2. hook_jsvmp_interpreter(mode='transparent', persistent=True) 3. navigate("https://www.douyin.com/...") If already navigated, call instrumentation(action='reload') after installing hooks to force a page reload with hooks active.
Args: script_url: Target script URL substring for stack filtering. persistent: Survive navigation (default True). mode: "proxy" (full coverage, detectable) or "transparent" (safe, lower coverage). track_calls, track_props, track_reflect: Only for mode="proxy". proxy_objects: Objects to proxy (default: navigator, screen, etc.). max_entries: Log buffer cap (default 10000).
Returns: dict with status, mode, coverage summary.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | proxy | |
| persistent | No | ||
| script_url | No | ||
| max_entries | No | ||
| track_calls | No | ||
| track_props | No | ||
| proxy_objects | No | ||
| track_reflect | No |