inspect_websiteHow to REA Websites & Web Apps: Passive Chrome CDP Loopback & DOM Forensics
Inspect single-page web applications and browser scenarios: connect over Chrome DevTools Protocol (CDP) loopback, extract DOM structure, unminify client scripts via sourcemaps, and capture visual page Evidence without triggering anti-bot protections.
In this official REA guide for Websites & Browser Scenarios, AI coding agents (Claude Code, Cursor, Windsurf) execute 'rea inspect-website https://example.com --json' to safely extract file layout, symbols, and code logic without launching unverified binaries.
The Problem & Target Artifact
Frontend security research and anti-cheat analysis: A browser-based game (e.g. Chrome Dinosaur) or dashboard calculates rules client-side. You need to inspect the exact JavaScript variables and math formulas without getting detected by anti-tamper scripts.
Natural Language Agent Instructions
Copy and paste this prompt directly into your AI coding agent when REA is registered via Model Context Protocol (MCP):
Inspect this browser game over CDP. Extract the acceleration constants and speed calculation formula from the client scripts, and explain how velocity increases over time.Run REA Analysis Command
Execute the following command in your terminal or inspect the MCP JSON-RPC call executed by your agent:
rea inspect-website https://example.com --jsonWhat REA Extracts & Returns
Extracted Client JavaScript Constant Rules
The verified findings and synthesized clean-room structures generated from this investigation:
// Extracted from minified game bundle via CDP loopback
const Runner = {
config: {
ACCELERATION: 0.001,
BG_CLOUD_SPEED: 0.2,
BOTTOM_PAD: 10,
CLEAR_TIME: 3000,
INITIAL_JUMP_VELOCITY: 12,
MAX_SPEED: 13,
SPEED: 6
}
};Passive CDP Loopback Observation Without Injected Hooks
Many modern web applications use `Function.prototype.toString` checks or timing hooks to detect debugging sessions. REA connects to an already-running Chromium browser over a loopback debug port (e.g. `127.0.0.1:9223`) in passive mode, reading existing network buffers and DOM states over CDP WebSockets without modifying native browser prototypes.