spawn
Launch a process in suspended mode to inject hooks before execution begins, enabling early-stage game manipulation and reverse engineering.
Instructions
Spawn a process suspended for early hooking.
Args:
path: Path to executable
args: Optional command line arguments
Returns:
Spawn information. Call resume() to start execution.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| args | No |
Implementation Reference
- The main handler function for the 'spawn' MCP tool. It spawns a new process using Frida's device.spawn(), attaches a session to it while suspended, sets session state, and returns spawn information. This implements process spawning with early hooking support.@mcp.tool() def spawn(path: str, args: List[str] = None) -> Dict[str, Any]: """ Spawn a process suspended for early hooking. Args: path: Path to executable args: Optional command line arguments Returns: Spawn information. Call resume() to start execution. """ global _session if not FRIDA_AVAILABLE: return {"error": "Frida not installed. Run: pip install frida frida-tools"} if _session.is_attached(): detach() try: device = get_device() spawn_args = [path] + (args or []) _session.pid = device.spawn(spawn_args) _session.session = device.attach(_session.pid) _session.process_name = path.split("\\")[-1].split("/")[-1] _session.spawned = True return { "success": True, "pid": _session.pid, "process_name": _session.process_name, "state": "suspended", "message": f"Spawned {_session.process_name}. Call resume() to start." } except Exception as e: return {"error": f"Failed to spawn: {str(e)}"}