// ⚠️ INSECURE DEMO — 仅用于演示攻击面,禁止照抄 import { app, BrowserWindow } from "electron"; app.whenReady().then(async () => { const win = new BrowserWindow({ show: false, webPreferences: { // 这三项是经典的危险组合:页面直接拿到 Node。 contextIsolation: false, sandbox: false, nodeIntegration: true, webSecurity: true, }, }); await win.loadURL("data:text/html,