replay_vmp_offline
Run captured VMP JavaScript in headless Node to verify extracted signing algorithms by comparing output with expected signatures from browser requests.
Instructions
Run captured VMP code in headless Node and call the entry function.
Useful for verifying you've correctly extracted the signing algorithm: call the VMP's signing function with the inputs a real request would use, and check that the output matches what the browser actually sent.
Args: vmp_code: The JavaScript source that defines the VMP / sign function. entry: The name of the function exported on global that we should call. input: A dict to pass to the entry function. Will be JSON-serialized and re-parsed inside the Node sandbox. timeout_ms: VM timeout. JS that runs longer triggers a V8 timeout error. expected_sign: optional reference sign captured from the browser. When set and auto_diff is True, the response includes a structured diff (match / common_prefix_len / first_diff_idx). auto_diff: if True and expected_sign is set, compute a structured diff. supplied_env: optional dict merged into the sandbox before the VMP code runs. Use this to feed navigator.userAgent, screen.width, Date.now(), document.cookie etc. (see auto_suggest_missing_props).
Returns: dict with status, output, elapsed_ms, optional diff, and optional suggestion hint when outputs don't match.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entry | Yes | ||
| input | Yes | ||
| vmp_code | Yes | ||
| auto_diff | No | ||
| timeout_ms | No | ||
| supplied_env | No | ||
| expected_sign | No |