001-net-fetch-hook — electron.net.fetch Hook
Bezetacil script that intercepts every HTTP request of the main process with stack capture
001-net-fetch-hook
Bezetacil script that hooks electron.net.fetch in the ChatGPT desktop main process. Logs url, method, headers, body (up to 12k chars) and the call stack (via Error.captureStackTrace — reads the stack region from RAM, without throwing) for each request. The unload restores the original net.fetch.
Source
~/.bezetacil-chatgpt/scripts/001-net-fetch-hook.js — see bezetacil for the harness and REST.
Captured data (real example — 2026-08-25)
Request GET /backend-api/wham/tasks/list of the desktop app:
url: https://chatgpt.com/backend-api/wham/tasks/list?limit=20&task_filter=current
headers:
OAI-Language: en-US
originator: Codex Desktop
Authorization: Bearer <JWT RS256, 10d, client app_EMoamEEZ73f0CkXaXp7hrann>
ChatGPT-Account-Id: aa06cafc-…
stack:
net.fetch ← y ← hI.performDesktopFetch ← hI.handleRequest ← kge.handleMessage
(renderer IPC → handleRequest → main injects auth → net.fetch)
The stack proves the link: the renderer asks via IPC, the main process resolves (handleRequest → performDesktopFetch), injects auth (WF/GF/KF), and executes net.fetch.