const fs = require('fs'); const gatewayCode = fs.readFileSync('D:/cumin/src/gateway.js', 'utf8'); // Extract HTML string between const HTML = ` and `; const startMarker = 'const HTML = `'; const endMarker = '`;\n\nfunction J'; const startIdx = gatewayCode.indexOf(startMarker); const endIdx = gatewayCode.indexOf(endMarker, startIdx); if (startIdx === -1 || endIdx === -1) { throw new Error('Markers not found'); } let html = gatewayCode.substring(startIdx + startMarker.length, endIdx); // Customize header for Ghaymah html = html.replace('SOC Command Center | Security Operations', 'Ghaymah SOC Command Center | Cloud Security Mesh'); html = html.replace('', ''); const outDir = 'D:/cumin/ghaymah_dns_net_sec_tests/soc_gateway_ui'; fs.mkdirSync(outDir, { recursive: true }); fs.writeFileSync(`${outDir}/index.html`, html, 'utf8'); console.log('Successfully extracted SOC Command Center HTML to:', `${outDir}/index.html`); console.log('HTML size:', html.length, 'bytes');