You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4. 📝 Show you how to execute the discovered routine
228
+
229
+
**Note:** The quickstart script is included in the repository. If you installed from PyPI, you can download it from the [GitHub repository](https://github.com/VectorlyApp/web-hacker/blob/main/quickstart.py).
230
+
204
231
## Launch Chrome in Debug Mode 🐞
205
232
206
-
### Instructions for MacOS
233
+
> 💡 **Tip:** The [quickstart script](#quickstart-easiest-way-🚀) automatically launches Chrome for you. You only need these manual instructions if you're not using the quickstart script.
207
234
208
-
```
209
-
# You should see JSON containing a webSocketDebuggerUrl like:
210
-
# ws://127.0.0.1:9222/devtools/browser/*************************************# Create temporary chrome user directory
211
-
mkdir $HOME/tmp
212
-
mkdir $HOME/tmp/chrome
235
+
### macOS
236
+
237
+
```bash
238
+
# Create temporary Chrome user directory
239
+
mkdir -p $HOME/tmp/chrome
213
240
214
-
# Launch Chrome app in debug mode (this exposes websocket for controlling and monitoring the browser)
# Launch Chrome in debug mode (adjust path if needed)
286
+
google-chrome \
287
+
--remote-debugging-address=127.0.0.1 \
288
+
--remote-debugging-port=9222 \
289
+
--user-data-dir="$HOME/tmp/chrome" \
290
+
--remote-allow-origins=* \
291
+
--no-first-run \
292
+
--no-default-browser-check
293
+
294
+
# Verify Chrome is running
295
+
curl http://127.0.0.1:9222/json/version
258
296
```
259
297
260
298
## HACK (reverse engineer) WEB APPS 👨🏻💻
@@ -265,6 +303,12 @@ The reverse engineering process follows a simple three-step workflow:
265
303
2.**Discover** — Let the AI agent analyze the captured data and generate a reusable Routine
266
304
3.**Execute** — Run the discovered Routine with different parameters to automate the task
267
305
306
+
### Quick Start (Recommended)
307
+
308
+
**Easiest way:** Use the [quickstart script](#quickstart-easiest-way-🚀) which automates the entire workflow.
309
+
310
+
### Manual Workflow (Step-by-Step)
311
+
268
312
Each step is detailed below. Start by ensuring Chrome is running in debug mode (see [Launch Chrome in Debug Mode](#launch-chrome-in-debug-mode-🐞) above).
269
313
270
314
### 0. Legal & Privacy Notice ⚠️
@@ -277,7 +321,7 @@ Use the CDP browser monitor to block trackers and capture network, storage, and
The script will open a new tab (starting at `about:blank`). Navigate to your target website, then manually perform the actions you want to automate (e.g., search, login, export report). Keep Chrome focused during this process. Press `Ctrl+C` and the script will consolidate transactions and produce a HAR automatically.
@@ -313,7 +357,7 @@ Use the **routine-discovery pipeline** to analyze captured data and synthesize a
313
357
314
358
**Linux/macOS (bash):**
315
359
```bash
316
-
python scripts/discover_routines.py \
360
+
web-hacker-discover \
317
361
--task "Recover API endpoints for searching for trains and their prices" \
python scripts/discover_routines.py --task "Recover the API endpoints for searching for trains and their prices" --cdp-captures-dir ./cdp_captures --output-dir ./routine_discovery_output --llm-model gpt-5
370
+
web-hacker-discover --task "Recover the API endpoints for searching for trains and their prices" --cdp-captures-dir ./cdp_captures --output-dir ./routine_discovery_output --llm-model gpt-5
0 commit comments