reverseloom # reverseloom ### ๐Ÿ•ธ๏ธ Hand the whole browser to an LLM โ€” it gets in, reverses the protocol, and writes a crawler that runs without a browser. **It just beat Akamai Bot Manager, hands-off, end-to-end. [See the run โ†“](#real-run)** [![Python](https://img.shields.io/badge/python-3.10+-3776AB?logo=python&logoColor=white)](https://www.python.org/) [![Built on graphloom](https://img.shields.io/badge/built%20on-graphloom-1C3C3C)](https://github.com/KuiChi-x/graphloom) [![Browser](https://img.shields.io/badge/browser-patchright%20+%20CDP-4285F4?logo=googlechrome&logoColor=white)](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright) [![Anti-detect: kc-browser](https://img.shields.io/badge/anti--detect-kc--browser-8A2BE2)](https://github.com/KuiChi-x/kc-browser) [![License](https://img.shields.io/badge/license-Apache%202.0-success)](LICENSE) ![Status](https://img.shields.io/badge/status-alpha-orange) [![Download for Windows](https://img.shields.io/badge/โฌ‡%20Download-Windows%20v1.0.0-2ea44f?style=for-the-badge)](https://github.com/KuiChi-x/reverseloom/releases/download/1.0.0/reverseloom_win.zip) [ไธญๆ–‡](README.zh-CN.md) ยท **English** ยท [Three walls](#three-walls) ยท [Full power](#full-power) ยท [Quick start](#quick-start) ยท [Capabilities](#capabilities)
--- **One prompt โ€” "write me a price crawler for this site" โ€” on a target behind Akamai Bot Manager.**
reverseloom tracing Akamai's bm-telemetry generator via CDP breakpoints
โ‘  Detects that a missing `bm-telemetry` header returns 403. Breakpoints `bmak.get_telemetry()`, dumps `akamai_bmak_bootstrap.js` + `akamai_bmak_runtime.js` straight off the page.
Browser-free crawler delivered โ€” 64 price records, 5/5 cold-start replays
โ‘ก Reproduces the sensor in the Node sandbox โ€” no browser โ€” and ships a standalone Python crawler: **HTTP 200 ยท 64 price records ยท 5/5 cold-start replays.** Done. --- ## ๐Ÿงฑ Scraping has three walls. reverseloom tears through all of them. | | The wall | The usual way | reverseloom | |---|---|---|---| | ๐Ÿงฑ **Wall 1** | **Can't get in** โ€” bot detection blocks you | patched fingerprints, still leaking `navigator.webdriver` + CDP traces | pair with [**kc-browser**](https://github.com/KuiChi-x/kc-browser): C++ kernel-level fingerprint, grows from inside the engine โ€” no script to unwrap | | ๐Ÿงฑ **Wall 2** | **Can't reverse it** โ€” data is signed / tokenized / encrypted | hand-reading obfuscated JS, a full day per algorithm | observer full-exposure + CDP breakpoints: model traces the generator, reproduces it in a sandbox โ€” 5/5 cold-start replays required | | ๐Ÿงฑ **Wall 3** | **Can't run it** โ€” crawler still needs a browser attached | headless browser resident forever | ships a **browser-free, cold-start-ready** pure-code crawler | Other tools stop at one wall. reverseloom welds **get in โ†’ reverse โ†’ ship a standalone crawler** into one chain. ## ๐Ÿ†š vs. ordinary browser agents | | Ordinary browser agent | **reverseloom** | |---|---|---| | What the model sees | screenshot + clickable elements | โœ… **fully exposed**: DOM + screenshot + network + JS debugger | | Signed / encrypted params | gets stuck or hallucinates | โœ… traces the generator โ†’ reproduces it in a sandbox | | Context | screenshots pile into history, blows up fast | โœ… observer overwrite-injection; history keeps only reasoning | | Deliverable | one-off action result | โœ… a **crawler that runs cold, browser-free** | | Runs | mostly cloud SaaS | โœ… fully local, data never leaves | Why observer, not tool-return-into-history? Browser state changes every turn and is huge โ€” piling it into history blows the context window. reverseloom injects only the *current* snapshot per turn (overwrite, never stored), so long reverse-engineering sessions stay lean. ## ๐Ÿš€ Quick start **Prerequisite:** a Chromium-based browser installed (Chrome / Edge / Chromium / Brave). reverseloom only drives it โ€” it **never downloads Chromium**. ### Option A โ€” download & run (Windows) 1. Download [**reverseloom_win.zip (v1.0.0)**](https://github.com/KuiChi-x/reverseloom/releases/download/1.0.0/reverseloom_win.zip), unzip, double-click `reverseloom.exe`. 2. In **Settings โ†’ Model**, fill `BASE_URL` / `API Key` / `MODEL`, save. Chatting in 3 minutes. The EXE ships its own Python runtime, so generated crawlers run via `run_shell` with zero setup. ### Option B โ€” from source (macOS / Linux / devs) ```bash git clone https://github.com/KuiChi-x/reverseloom.git && cd reverseloom pip install -e . # pulls graphloom + patchright from PyPI; no `patchright install chromium` python -m reverseloom # native desktop window python -m reverseloom --web # or serve, open in your browser ``` For local development (tests, lint, agent-generated crawlers), use `pip install -e ".[dev]"` โ€” crawler dependencies are part of the core runtime. See [docs/development.md](docs/development.md). The Node sandbox ships prebuilt (`reverseloom-sandbox.bundle.js`) โ€” works out of the box. ### Configure In the UI under **Settings โ†’ Model**, or via `.env`. The model must support **image input + streaming output**.
Model settings screen
```dotenv MODEL_PROTOCOL=openai/chat # anthropic / openai/chat / openai/responses BASE_URL=https://api.openai.com/v1 OPENAI_API_KEY=sk-... MODEL=gpt-4o ``` | Env var | Purpose | |---|---| | `REVERSELOOM_BROWSER_PATH` | Force a specific browser (e.g. kc-browser). Leave empty to auto-detect Chrome โ†’ Edge โ†’ Chromium โ†’ Brave. | | `REVERSELOOM_PROXY_HOST/PORT/USERNAME/PASSWORD` | Optional upstream proxy; auth injected by a local tunnel | > โš ๏ธ `run_shell` executes arbitrary commands โ€” only point it at paths you trust. ## ๐Ÿ› ๏ธ Capabilities (30+ tools)
reverseloom comparing round-trip flights across four travel sites

"Compare round-trip fares for me." It drives four travel sites and reports back โ€” even flagging where a login wall blocked it from confirming the tax-inclusive total, instead of making a number up.

๐ŸŒ Browser automation `browser_navigate` / `browser_click` (ocId or pixel) / `browser_type` / `select_option` / `press_key` / `scroll_page` / `browser_drag` (WindMouse humanized path for sliders) / tabs / `browser_evaluate` / `reset_browser_state`
๐Ÿ”ฌ JS reverse-engineering ยท CDP - **Breakpoints**: `set_line_breakpoint` / `break_on_request` / `get_paused_state` / `evaluate_in_call_frame` / `step_execution` - **Network**: `search_in_network_payloads` / `inspect_network_request` (with initiator stack) - **Scripts**: `search_in_js_codes` / `get_script_source` / `dump_runtime_asset` - **C++ Native binding trace** *([kc-browser](https://github.com/KuiChi-x/kc-browser) only)*: auto-written under `/_native_trace/**.jsonl` โ€” hash pre-images + native leaf values for sandbox environment rebuild when CDP alone is not enough. Stock Chrome/Edge ignore the flag and emit nothing.
๐Ÿ‘๏ธ Vision + human hand-off - `visual_locate` โ€” multimodal coordinate location (captchas, canvas, non-enumerable targets) - `request_user_interaction` โ€” pause for login / captcha / clarification, then resume
๐Ÿ“ File / shell ยท ๐Ÿงฉ Skills - `read_file` / `write_file` / `edit_file` / `list_dir` / `search_code` / `run_shell` - `web-crawl` / `deep-reverse` โ€” loaded on demand, never pollute context - Custom skills: `~/.reverseloom/skills//SKILL.md`, auto-discovered on launch
## ๐Ÿงฌ Architecture ``` โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ graphloom โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ agent loop ยท short-term memory ยท context compaction ยท observer ยท skills โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ reverseloom contributes โ†“ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” browser mgmt tool groups system prompt web shell Node sandbox (patchright+CDP) (automation/ (reverse review) (FastAPI+WS) (jsdom repro) reverse/vision) ``` - **Browser**: patchright auto-launches your system Chromium; each session gets its own profile, fingerprint launch args (`--fp-seed` / `--fp-timezone` / `--fp-platform`), optional proxy tunnel, and a per-page CDP handler for lossless network capture + JS debugging. - **Sandbox**: run a dumped sign/token/encryption generator offline in Node + jsdom โ€” anti-detection armor + deep-Proxy monitoring. Feed it a payload, get back the result, missing-API todo list, and captured network. - **C++ Native binding trace** *([kc-browser](https://github.com/KuiChi-x/kc-browser) only)*: when `REVERSELOOM_BROWSER_PATH` points at kc-browser, each session is launched with `--fp-native-trace-dir=/_native_trace`. The engine records native API reads/calls as JSONL keyed by `line:column` โ€” hash inputs in plaintext (`TextEncoder.encode` / `digest` / `JSON.stringify` args) plus exact leaf values (`BatteryManager.level`, `NetworkInformation.rtt`, โ€ฆ). When sandbox environment rebuild stalls, the `deep-reverse` skill reads that trace as an oracle instead of guessing missing APIs. Stock Chrome/Edge ignore the flag; an empty `_native_trace` dir means the browser did not emit one. ## ๐Ÿฅท Full power: pair with kc-browser Wall 1 has a full-power answer in the sibling project [**kc-browser**](https://github.com/KuiChi-x/kc-browser). Ordinary anti-detection patches the JS layer โ€” patches leave seams. kc-browser modifies **Chromium's C++ kernel**, so the fingerprint grows from the engine up: UA / Client Hints / WebGL / Canvas / Audio / fonts / hardware all self-consistent, no injectable script, no `navigator.webdriver`. One 64-bit seed = one identity; rotate without restarting. reverseloom already speaks its flags โ€” just point `REVERSELOOM_BROWSER_PATH` at kc-browser (or set it under **Settings โ†’ Browser**). Regular Chrome works too; the flags are simply ignored.
Browser path settings screen
## ๐Ÿ“‚ Project layout ``` src/reverseloom/ __main__.py desktop entry (pywebview) agent/ assembly, model adapter, prompts runtime/ config, settings, persistence browser/ manager ยท session ยท cdp_handler ยท proxy ยท fingerprint observer ยท dom/ ยท sandbox_env/ (Node + jsdom) tools/ filesystem ยท browser/{automation,investigation,visual} web/ HTTP + WebSocket adapters ``` ## โš–๏ธ Compliance For **research, testing, and authorized data integration** only. Operate only on sites you own or are authorized to test; comply with each site's ToS, `robots.txt`, and local law. Reversing signatures, bypassing captchas, and using fingerprints/proxies may violate some sites' terms โ€” **the risk is entirely yours.** Contributors are not responsible for misuse. ## ๐Ÿงฉ The family โ€” one pipeline | Project | Layer | One line | |---|---|---| | [**kc-browser**](https://github.com/KuiChi-x/kc-browser) | ๐Ÿฅท get in | C++ kernel-level anti-detect fingerprint browser | | [**reverseloom**](https://github.com/KuiChi-x/reverseloom) | ๐Ÿ”ฌ reverse | observer full-exposure + CDP + sandbox โ†’ browser-free crawler (this repo) | | [**graphloom**](https://github.com/KuiChi-x/graphloom) | ๐Ÿงต drive | the agent framework underneath โ€” observer, compaction, skills | ## โญ Star History If it saved you hours of reverse-engineering, a Star on all three helps ๐Ÿ‘‡ [![Star History Chart](https://api.star-history.com/svg?repos=KuiChi-x/reverseloom,KuiChi-x/kc-browser,KuiChi-x/graphloom&type=Date)](https://star-history.com/#KuiChi-x/reverseloom&KuiChi-x/kc-browser&KuiChi-x/graphloom&Date) ## ๐Ÿ“„ License [Apache 2.0](LICENSE) ยฉ KuiChi-x ยท [Issues](https://github.com/KuiChi-x/reverseloom/issues) ยท [ไธญๆ–‡ๆ–‡ๆกฃ](README.zh-CN.md) Keywords ยท browser agent ยท web / JS reverse engineering ยท anti-bot ยท CDP debugging ยท sign / token / encryption cracking ยท captcha bypass ยท crawler generator ยท LLM agent
ๅ…ณ้”ฎ่ฏ ยท ๆต่งˆๅ™จ Agent ยท ็ฝ‘้กต้€†ๅ‘ ยท JS ้€†ๅ‘ ยท ็ˆฌ่™ซ ยท ๅ็ˆฌ ยท ้ชŒ่ฏ็ ็ ด่งฃ ยท ็ญพๅ/ๅŠ ๅฏ†่ฟ˜ๅŽŸ ยท ๆ–ญ็‚น่ฐƒ่ฏ• ยท ๆ•ฐๆฎ้‡‡้›† ยท ๅคงๆจกๅž‹ๆ™บ่ƒฝไฝ“