# REA can reverse engineer a website, not just a binary

> Point it at a Chrome DevTools endpoint and it captures, exports and analyzes the page's scripts.

URL: https://allenkao.com/til/rea-reads-websites/
Published: 2026-10-17

[REA](https://github.com/morluto/rea) bills itself as reverse engineering for native binaries, but its web commands work on any site. It needs a loopback Chrome DevTools endpoint, so start a headless Chrome first:

```bash
chrome --headless=new --remote-debugging-port=9333 https://example.com
npx rea-agents list-browser-targets http://127.0.0.1:9333
```

Then `capture-browser-scenario` takes screenshots and DOM snapshots, `export-web-scripts` writes the page's scripts to disk, and `analyze-javascript-application` reads them back as a module graph.

One catch: `analyze-web-bundle` only sees scripts that load after it attaches. On a page that loads its code up front, run a scenario capture with network events on instead.
