detach
Disconnect from the current game process to stop monitoring or modifying memory, values, or functions during reverse engineering.
Instructions
Detach from the current process.
Returns:
Detach status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main handler function for the 'detach' tool. Detaches the Frida session from the currently attached process, unloads all active hooks and custom scripts, resets the global session state, and returns the status.@mcp.tool() def detach() -> Dict[str, Any]: """ Detach from the current process. Returns: Detach status. """ global _session if not _session.is_attached(): return {"message": "No active session"} try: for hook_info in _session.hooks.values(): try: hook_info.script.unload() except: pass for script in _session.custom_scripts.values(): try: script.unload() except: pass _session.session.detach() old_name = _session.process_name _session.reset() return {"success": True, "message": f"Detached from {old_name}"} except Exception as e: _session.reset() return {"error": f"Error during detach: {str(e)}"}