@jshookmcp/jshook 0.2.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/dist/{AntiCheatDetector-BNk-EoBt.mjs → AntiCheatDetector-CqGDXmfc.mjs} +159 -53
- package/dist/{CodeInjector-Cq8q01kp.mjs → CodeInjector-BdjRfNx7.mjs} +5 -5
- package/dist/{ConsoleMonitor-CPVQW1Y-.mjs → ConsoleMonitor-DykL3IAw.mjs} +85 -17
- package/dist/{DetailedDataManager-BQQcxh64.mjs → DetailedDataManager-HT49OrvF.mjs} +1 -1
- package/dist/{ExtensionManager-CWYgw0YW.mjs → ExtensionManager-BDMsY2Dz.mjs} +15 -8
- package/dist/{HardwareBreakpoint-B9gZCdFP.mjs → HardwareBreakpoint-Cc2AFq1Y.mjs} +3 -3
- package/dist/{HeapAnalyzer-BLDH0dCv.mjs → HeapAnalyzer-DruMgsgj.mjs} +20 -20
- package/dist/{HookGeneratorBuilders.core.generators.storage-CtcdK78Q.mjs → HookGeneratorBuilders.core.generators.storage-CTbB4Lcx.mjs} +1 -74
- package/dist/{InstrumentationSession-CvPC7Jwy.mjs → InstrumentationSession-DLH0vd-z.mjs} +2 -2
- package/dist/{MemoryController-CbVdCIJF.mjs → MemoryController-CMtviNW_.mjs} +3 -3
- package/dist/{MemoryScanSession-BsDZbLYm.mjs → MemoryScanSession-ITgb_NMi.mjs} +2 -2
- package/dist/{MemoryScanner-Bcpml6II.mjs → MemoryScanner-CiL7Z3ey.mjs} +12 -9
- package/dist/{NativeMemoryManager.impl-dZtA1ZGn.mjs → NativeMemoryManager.impl-D9Lkovvn.mjs} +13 -10
- package/dist/{NativeMemoryManager.utils-B-FjA2mJ.mjs → NativeMemoryManager.utils-BBlAixF5.mjs} +1 -1
- package/dist/{PEAnalyzer-D1lzJ_VG.mjs → PEAnalyzer-DMQ44gen.mjs} +15 -15
- package/dist/{PageController-Bqm2kZ_X.mjs → PageController-BPJNqqBN.mjs} +18 -4
- package/dist/{PointerChainEngine-BOhyVsjx.mjs → PointerChainEngine-K7wN8Z-w.mjs} +10 -7
- package/dist/ProcessRegistry-zGg12QbE.mjs +74 -0
- package/dist/{ResponseBuilder-D3iFYx2N.mjs → ResponseBuilder-CJXWmWNw.mjs} +10 -10
- package/dist/{ScriptManager-aHHq0X7U.mjs → ScriptManager-ZuWD-0Jg.mjs} +195 -192
- package/dist/{Speedhack-CqdIFlQl.mjs → Speedhack-D-z0umeT.mjs} +2 -2
- package/dist/{StructureAnalyzer-DhFaPvRO.mjs → StructureAnalyzer-Cav5AVSL.mjs} +9 -6
- package/dist/{ToolCatalog-C0JGZoOm.mjs → ToolCatalog-5OJdMiF0.mjs} +81 -81
- package/dist/{ToolProbe-oC7aPrkv.mjs → ToolProbe-DbCFGyrg.mjs} +1 -1
- package/dist/{ToolRegistry-BjaF4oNz.mjs → ToolRegistry-B9krbTtI.mjs} +51 -2
- package/dist/{ToolRouter.policy-BWV67ZK-.mjs → ToolRouter.policy-BGDAGyeH.mjs} +60 -20
- package/dist/TraceRecorder-B41Z5XBj.mjs +1286 -0
- package/dist/{Win32API-CePkipZY.mjs → Win32API-C2kjj0ze.mjs} +18 -12
- package/dist/{Win32Debug-BvKs-gxc.mjs → Win32Debug-CKrGOTpo.mjs} +2 -2
- package/dist/{WorkflowEngine-CuvkZtWu.mjs → WorkflowEngine-DJ6M4opp.mjs} +226 -255
- package/dist/analysis-BHeJW2Nb.mjs +1234 -0
- package/dist/{antidebug-CqDTB_uk.mjs → antidebug-BRKeyt27.mjs} +3 -3
- package/dist/{artifactRetention-CFEprwPw.mjs → artifactRetention-CPXkUJXp.mjs} +13 -6
- package/dist/{artifacts-Bk2-_uPq.mjs → artifacts-DkfosXH3.mjs} +1 -1
- package/dist/authorization-schema-DRqyJMSk.mjs +31 -0
- package/dist/{binary-instrument-CXfpx6fT.mjs → binary-instrument--V3MAhJ4.mjs} +19 -27
- package/dist/bind-helpers-ClV34xdn.mjs +42 -0
- package/dist/{boringssl-inspector-BH2D3VKc.mjs → boringssl-inspector-Bo_LOLaS.mjs} +1 -1
- package/dist/{browser-BpOr5PEx.mjs → browser-Dx3_S2cG.mjs} +324 -37
- package/dist/capabilities-CcHlvWgK.mjs +33 -0
- package/dist/{constants-B0OANIBL.mjs → constants-CDZLOoVv.mjs} +18 -3
- package/dist/{coordination-qUbyF8KU.mjs → coordination-DgItD9DL.mjs} +2 -2
- package/dist/{debugger-gnKxRSN0.mjs → debugger-RS3RSAqs.mjs} +30 -13
- package/dist/definitions-BEoYofW5.mjs +47 -0
- package/dist/{definitions-bAhHQJq9.mjs → definitions-BRaefg3u.mjs} +11 -5
- package/dist/{definitions-DVGfrn7y.mjs → definitions-BbkvZkiv.mjs} +2 -2
- package/dist/definitions-BtWSHJ3o.mjs +17 -0
- package/dist/{definitions-BMfYXoNC.mjs → definitions-C1gCHO0i.mjs} +1 -1
- package/dist/{definitions-C1UvM5Iy.mjs → definitions-CDOg_b-l.mjs} +14 -2
- package/dist/definitions-CVPD9hzZ.mjs +54 -0
- package/dist/{definitions-Cke7zEb8.mjs → definitions-Cea8Lgl7.mjs} +1 -1
- package/dist/definitions-DAgIyjxM.mjs +10 -0
- package/dist/{definitions-B4rAvHNZ.mjs → definitions-DJA27nsL.mjs} +12 -9
- package/dist/{definitions-ClJLzsJQ.mjs → definitions-DKPFU3LW.mjs} +1 -1
- package/dist/{definitions-D3VsGcvz.mjs → definitions-DPRpZQ96.mjs} +7 -7
- package/dist/{definitions-B18eyf0B.mjs → definitions-DUE5gmdn.mjs} +1 -1
- package/dist/definitions-DYVjOtxa.mjs +26 -0
- package/dist/{definitions-BB_4jnmy.mjs → definitions-DcYLVLCo.mjs} +1 -1
- package/dist/{definitions-Beid2EB3.mjs → definitions-Pp5LI2H4.mjs} +1 -1
- package/dist/definitions-j9KdHVNR.mjs +14 -0
- package/dist/definitions-uzkjBwa7.mjs +258 -0
- package/dist/{definitions-Cq-zroAU.mjs → definitions-va-AnLuQ.mjs} +4 -4
- package/dist/{encoding-Bvz5jLRv.mjs → encoding-DJeqHmpd.mjs} +18 -4
- package/dist/{evidence-graph-bridge-C_fv9PuC.mjs → evidence-graph-bridge-DcYizFk2.mjs} +1 -0
- package/dist/{factory-DxlGh9Xf.mjs → factory-C90tBff6.mjs} +6 -6
- package/dist/flat-target-session-Dgax2Cy3.mjs +29 -0
- package/dist/{graphql-DYWzJ29s.mjs → graphql-CoHrhweh.mjs} +205 -34
- package/dist/{handlers-C67ktuRN.mjs → handlers-4jmR0nMs.mjs} +220 -32
- package/dist/{handlers-DlCJN4Td.mjs → handlers-BAHPxcch.mjs} +122 -90
- package/dist/{handlers-9sAbfIg-.mjs → handlers-BOs9b907.mjs} +849 -801
- package/dist/{handlers-DxGIq15_2.mjs → handlers-BWXEy6ef.mjs} +16 -16
- package/dist/{handlers-tB9Mp9ZK.mjs → handlers-Bndn6QvE.mjs} +31 -4
- package/dist/{handlers-CTsDAO6p.mjs → handlers-BqC4bD4s.mjs} +1 -1
- package/dist/{handlers-C87g8oCe.mjs → handlers-BtYq60bM2.mjs} +1 -1
- package/dist/{handlers-DeLOCd5m.mjs → handlers-BzgcB4iv.mjs} +17 -17
- package/dist/{handlers-Cgyg6c0U.mjs → handlers-CRyRWj2b.mjs} +237 -23
- package/dist/{handlers-U6L4xhuF.mjs → handlers-CVv2H1uq.mjs} +24 -17
- package/dist/{handlers-tiy7EIBp.mjs → handlers-Dl5a7JS4.mjs} +3 -3
- package/dist/{handlers-D6j6yka7.mjs → handlers-Dx2d7jt7.mjs} +1893 -1480
- package/dist/{handlers-Bl8zkwz1.mjs → handlers-Dz9PYsCa.mjs} +95 -6
- package/dist/handlers-HujRKC3b.mjs +661 -0
- package/dist/{handlers.impl-DS0d9fUw.mjs → handlers.impl-XWXkQfyi.mjs} +70 -24
- package/dist/{hooks-CzCWByww.mjs → hooks-B1B8NRHL.mjs} +3 -3
- package/dist/index.mjs +154 -144
- package/dist/{maintenance-P7ePRXQC.mjs → maintenance-PRMkLVRW.mjs} +35 -30
- package/dist/manifest-67Bok-Si.mjs +58 -0
- package/dist/{manifest-B3QVVeBS.mjs → manifest-6lNTMZAB2.mjs} +33 -28
- package/dist/manifest-B2duEHiH.mjs +90 -0
- package/dist/manifest-B6EY9Vm8.mjs +57 -0
- package/dist/{manifest-gZ4s_UtG.mjs → manifest-B6nKSbyY.mjs} +32 -33
- package/dist/{manifest-2ToTpjv8.mjs → manifest-BL8AQNPF.mjs} +31 -31
- package/dist/{manifest-DzwvxPJX.mjs → manifest-BSZvJJmV.mjs} +23 -14
- package/dist/{manifest-Sc_0JQ13.mjs → manifest-BU7qzUyX.mjs} +23 -23
- package/dist/{manifest-CT7zZBV1.mjs → manifest-Bl62e8WK.mjs} +24 -23
- package/dist/manifest-Bo5cXjdt.mjs +82 -0
- package/dist/manifest-BpS4gtUK.mjs +1347 -0
- package/dist/manifest-Bv65_e2W.mjs +101 -0
- package/dist/manifest-BytNIF4Z.mjs +117 -0
- package/dist/{manifest-BqrQ4Tpj.mjs → manifest-C-xtsjS3.mjs} +23 -23
- package/dist/{manifest-NXctwWQq.mjs → manifest-CDYl7OhA.mjs} +36 -38
- package/dist/manifest-CRZ3xmkD.mjs +61 -0
- package/dist/manifest-CoW6u4Tp.mjs +132 -0
- package/dist/manifest-Cq5zN_8A.mjs +50 -0
- package/dist/{manifest-CAhOuvSl.mjs → manifest-D7YZM_2e.mjs} +75 -85
- package/dist/{manifest-DCyjf4n2.mjs → manifest-DE_VrAeQ.mjs} +27 -7
- package/dist/manifest-DGsXSCpT.mjs +39 -0
- package/dist/{manifest-BB2J8IMJ.mjs → manifest-DJ2vfEuW.mjs} +48 -41
- package/dist/{manifest-3g71z6Bg.mjs → manifest-DPXDYhEu.mjs} +26 -25
- package/dist/manifest-Dd4fQb0a.mjs +322 -0
- package/dist/{manifest-CXsRWjjI.mjs → manifest-Deq6opGg.mjs} +95 -96
- package/dist/{manifest-C9RT5nk32.mjs → manifest-DfJTafJK.mjs} +14 -11
- package/dist/manifest-DgOdgN_j.mjs +50 -0
- package/dist/{manifest-BmtZzQiQ2.mjs → manifest-DlbMW4v4.mjs} +17 -15
- package/dist/{manifest-DrbmZcFl2.mjs → manifest-DmVfbH0w.mjs} +212 -91
- package/dist/manifest-Dog6Ddjr.mjs +109 -0
- package/dist/manifest-DvgU5FWb.mjs +58 -0
- package/dist/manifest-HsfDBs7j.mjs +50 -0
- package/dist/manifest-I8oQHvCG.mjs +186 -0
- package/dist/manifest-NvH_a-av.mjs +786 -0
- package/dist/{manifest-Dh8WBmEW.mjs → manifest-cEJU1v0Z.mjs} +24 -24
- package/dist/manifest-wOl5XLB12.mjs +112 -0
- package/dist/{modules-C184v-S9.mjs → modules-tZozf0LQ.mjs} +130 -860
- package/dist/{mojo-ipc-B_H61Afw.mjs → mojo-ipc-DXNEXEqb.mjs} +141 -26
- package/dist/{network-671Cw6hV.mjs → network-CPVvwvFg.mjs} +1329 -823
- package/dist/{outputPaths-B1uGmrWZ.mjs → outputPaths-um7lCRY3.mjs} +4 -8
- package/dist/{platform-WmNn8Sxb.mjs → platform-CYeFoTWp.mjs} +101 -10
- package/dist/{process-QcbIy5Zq.mjs → process-BTbgcVc6.mjs} +251 -346
- package/dist/{proxy-DqNs0bAd.mjs → proxy-r8YN6nP1.mjs} +30 -8
- package/dist/{registry-D-6e18lB.mjs → registry-Bl8ZQW61.mjs} +3 -3
- package/dist/{response-BQVP-xUn.mjs → response-CWhh2aLo.mjs} +7 -1
- package/dist/{shared-state-board-DV-dpHFJ.mjs → shared-state-board-BoZnSoj-.mjs} +2 -2
- package/dist/{sourcemap-Dq8ez8vS.mjs → sourcemap-BIDHUVXy.mjs} +350 -66
- package/dist/{streaming-BUQ0VJsg.mjs → streaming-Dal6utPp.mjs} +13 -13
- package/dist/{tool-builder-DCbIC5Eo.mjs → tool-builder-BHJp32mV.mjs} +1 -1
- package/dist/{transform-CiYJfNX0.mjs → transform-DRVgGG90.mjs} +18 -14
- package/dist/wasm-BYx5UOeG.mjs +1044 -0
- package/dist/webcrack-Be0_FccV.mjs +747 -0
- package/dist/{workflow-f3xJOcjx.mjs → workflow-BpuKEtvn.mjs} +8 -8
- package/package.json +76 -43
- package/dist/TraceRecorder-DgxyVbdQ.mjs +0 -519
- package/dist/analysis-CL9uACt9.mjs +0 -463
- package/dist/bind-helpers-xFfRF-qm.mjs +0 -22
- package/dist/definitions-6M-eejaT.mjs +0 -53
- package/dist/definitions-B3QdlrHv.mjs +0 -34
- package/dist/definitions-CXEI7QC72.mjs +0 -216
- package/dist/definitions-C_4r7Fo-2.mjs +0 -14
- package/dist/definitions-CkFDALoa.mjs +0 -26
- package/dist/definitions-Cy3Sl6gV.mjs +0 -34
- package/dist/definitions-LKpC3-nL.mjs +0 -9
- package/dist/handlers-DdFzXLvF.mjs +0 -446
- package/dist/manifest-82baTv4U.mjs +0 -45
- package/dist/manifest-BKbgbSiY.mjs +0 -60
- package/dist/manifest-Bcf-TJzH.mjs +0 -848
- package/dist/manifest-Bnd7kqEY.mjs +0 -55
- package/dist/manifest-BqQX6OQC2.mjs +0 -65
- package/dist/manifest-Br4RPFt5.mjs +0 -370
- package/dist/manifest-C5qDjysN.mjs +0 -107
- package/dist/manifest-CBYWCUBJ.mjs +0 -51
- package/dist/manifest-CFADCRa1.mjs +0 -37
- package/dist/manifest-CQVhavRF.mjs +0 -114
- package/dist/manifest-CV12bcrF.mjs +0 -121
- package/dist/manifest-CZLUCfG02.mjs +0 -95
- package/dist/manifest-D6phHKFd.mjs +0 -131
- package/dist/manifest-DHsnKgP6.mjs +0 -60
- package/dist/manifest-Df_dliIe.mjs +0 -55
- package/dist/manifest-DhKRAT8_.mjs +0 -92
- package/dist/manifest-DlpTj4ic2.mjs +0 -193
- package/dist/manifest-DuwHjUa5.mjs +0 -70
- package/dist/manifest-qSleDqdO.mjs +0 -1023
- package/dist/wasm-DQTnHDs4.mjs +0 -531
- /package/dist/{CacheAdapters-CDe5WPSV.mjs → CacheAdapters-jJFy20G-.mjs} +0 -0
- /package/dist/{DarwinAPI-BNPxu0RH.mjs → DarwinAPI-ETyy0xyo.mjs} +0 -0
- /package/dist/{EventBus-DgPmwpeu.mjs → EventBus-DFKvADm3.mjs} +0 -0
- /package/dist/{EvidenceGraphBridge-SFesNera.mjs → EvidenceGraphBridge-318Oi0Lf.mjs} +0 -0
- /package/dist/{FingerprintManager-gzWtkKuf.mjs → FingerprintManager-BN4UQWnX.mjs} +0 -0
- /package/dist/{PrerequisiteError-Dl33Svkz.mjs → PrerequisiteError-TuyZIs6n.mjs} +0 -0
- /package/dist/{ReverseEvidenceGraph-Dlsk94LC.mjs → ReverseEvidenceGraph-C02-gXOh.mjs} +0 -0
- /package/dist/{StealthVerifier-Bo4T3bz8.mjs → StealthVerifier-BWmPgQsv.mjs} +0 -0
- /package/dist/{VersionDetector-CwVLVdDM.mjs → VersionDetector-K3V4vGsw.mjs} +0 -0
- /package/dist/{betterSqlite3-0pqusHHH.mjs → betterSqlite3-DLSBZodi.mjs} +0 -0
- /package/dist/{concurrency-Bt0yv1kJ.mjs → concurrency-Drev_Vz9.mjs} +0 -0
- /package/dist/{formatAddress-DVkj9kpI.mjs → formatAddress-nnMvEohD.mjs} +0 -0
- /package/dist/{parse-args-BlRjqlkL.mjs → parse-args-B4cY5Vx5.mjs} +0 -0
- /package/dist/{ssrf-policy-ZaUfvhq7.mjs → ssrf-policy-Dsqd-DTX.mjs} +0 -0
- /package/dist/{types-CPhOReNX.mjs → types-DDBWs9UP.mjs} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { o as argStringArray, r as argNumber, t as argBool } from "./parse-args-
|
|
2
|
-
import { o as evaluateOnNewDocumentWithTimeout, s as evaluateWithTimeout } from "./PageController-
|
|
3
|
-
import "./definitions-
|
|
1
|
+
import { o as argStringArray, r as argNumber, t as argBool } from "./parse-args-B4cY5Vx5.mjs";
|
|
2
|
+
import { o as evaluateOnNewDocumentWithTimeout, s as evaluateWithTimeout } from "./PageController-BPJNqqBN.mjs";
|
|
3
|
+
import "./definitions-DUE5gmdn.mjs";
|
|
4
4
|
//#region src/server/domains/antidebug/scripts.data.bypass-core.ts
|
|
5
5
|
const ANTI_DEBUG_BYPASS_CORE_SCRIPTS = {
|
|
6
6
|
bypassDebuggerStatement: `(function () {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as logger } from "./logger-Dh_xb7_2.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { c as getConfig, i as getProjectRoot, n as getDebuggerSessionsDir } from "./outputPaths-
|
|
4
|
-
import { n as getArtifactDir, r as getArtifactsRoot } from "./artifacts-
|
|
2
|
+
import { b as CACHE_LOW_HIT_RATE_THRESHOLD, hr as TOKEN_BUDGET_MAX_TOKENS, y as CACHE_GLOBAL_MAX_SIZE_BYTES } from "./constants-CDZLOoVv.mjs";
|
|
3
|
+
import { c as getConfig, i as getProjectRoot, n as getDebuggerSessionsDir } from "./outputPaths-um7lCRY3.mjs";
|
|
4
|
+
import { n as getArtifactDir, r as getArtifactsRoot } from "./artifacts-DkfosXH3.mjs";
|
|
5
5
|
import { join, resolve } from "node:path";
|
|
6
6
|
import { readdir, rm, stat } from "node:fs/promises";
|
|
7
7
|
//#region src/utils/TokenBudgetManager.ts
|
|
@@ -462,6 +462,10 @@ async function cleanupArtifacts(options) {
|
|
|
462
462
|
const remaining = [];
|
|
463
463
|
const removedSample = [];
|
|
464
464
|
const root = getProjectRoot();
|
|
465
|
+
const pendingRemovals = [];
|
|
466
|
+
function scheduleRemoval(path) {
|
|
467
|
+
pendingRemovals.push(rm(path, { force: true }).then(() => void 0).catch(() => void 0));
|
|
468
|
+
}
|
|
465
469
|
for (const directory of directories) await walkAndProcess(directory, root, cutoff, dryRun, (entry) => {
|
|
466
470
|
scannedFiles++;
|
|
467
471
|
if (cutoff > 0 && entry.mtimeMs < cutoff) {
|
|
@@ -469,7 +473,7 @@ async function cleanupArtifacts(options) {
|
|
|
469
473
|
removedBytes += entry.size;
|
|
470
474
|
removedByAge += entry.size;
|
|
471
475
|
if (removedSample.length < 20) removedSample.push(entry.relativePath);
|
|
472
|
-
if (!dryRun)
|
|
476
|
+
if (!dryRun) scheduleRemoval(entry.path);
|
|
473
477
|
} else remaining.push(entry);
|
|
474
478
|
});
|
|
475
479
|
if (config.maxTotalBytes > 0) {
|
|
@@ -484,13 +488,16 @@ async function cleanupArtifacts(options) {
|
|
|
484
488
|
removedBytes += entry.size;
|
|
485
489
|
removedBySize += entry.size;
|
|
486
490
|
if (removedSample.length < 20) removedSample.push(entry.relativePath);
|
|
487
|
-
if (!dryRun)
|
|
491
|
+
if (!dryRun) scheduleRemoval(entry.path);
|
|
488
492
|
i++;
|
|
489
493
|
}
|
|
490
494
|
remaining.splice(0, i);
|
|
491
495
|
}
|
|
492
496
|
}
|
|
493
|
-
if (!dryRun)
|
|
497
|
+
if (!dryRun) {
|
|
498
|
+
await Promise.all(pendingRemovals);
|
|
499
|
+
await Promise.all(directories.map((dir) => pruneEmptyDirectories(dir)));
|
|
500
|
+
}
|
|
494
501
|
return {
|
|
495
502
|
success: true,
|
|
496
503
|
scannedFiles,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-CjcI7cDX.mjs";
|
|
2
|
-
import { i as getProjectRoot } from "./outputPaths-
|
|
2
|
+
import { i as getProjectRoot } from "./outputPaths-um7lCRY3.mjs";
|
|
3
3
|
import { isAbsolute, normalize, relative, resolve, sep } from "node:path";
|
|
4
4
|
import { mkdir } from "node:fs/promises";
|
|
5
5
|
//#region src/utils/artifacts.ts
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//#region src/server/domains/network/authorization-schema.ts
|
|
2
|
+
const networkAuthorizationSchema = {
|
|
3
|
+
allowedHosts: {
|
|
4
|
+
type: "array",
|
|
5
|
+
items: { type: "string" },
|
|
6
|
+
description: "Exact hostnames or IP literals allowed for this request."
|
|
7
|
+
},
|
|
8
|
+
allowedCidrs: {
|
|
9
|
+
type: "array",
|
|
10
|
+
items: { type: "string" },
|
|
11
|
+
description: "Explicit CIDR ranges allowed for this request."
|
|
12
|
+
},
|
|
13
|
+
allowPrivateNetwork: {
|
|
14
|
+
type: "boolean",
|
|
15
|
+
description: "Allow access to private or reserved network targets, but only when the resolved host matches allowedHosts or allowedCidrs."
|
|
16
|
+
},
|
|
17
|
+
allowInsecureHttp: {
|
|
18
|
+
type: "boolean",
|
|
19
|
+
description: "Allow plain HTTP access to explicitly authorized targets in allowedHosts or allowedCidrs."
|
|
20
|
+
},
|
|
21
|
+
expiresAt: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Optional ISO-8601 expiry time for this authorization."
|
|
24
|
+
},
|
|
25
|
+
reason: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Short audit note describing why this authorization is needed."
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { networkAuthorizationSchema as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-CjcI7cDX.mjs";
|
|
2
2
|
import { t as logger } from "./logger-Dh_xb7_2.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import { t as probeCommand } from "./ToolProbe-
|
|
3
|
+
import { Q as FRIDA_TIMEOUT_MS, et as GHIDRA_TIMEOUT_MS, xr as UNIDBG_TIMEOUT_MS } from "./constants-CDZLOoVv.mjs";
|
|
4
|
+
import { t as probeCommand } from "./ToolProbe-DbCFGyrg.mjs";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { basename, dirname, join } from "node:path";
|
|
@@ -17,6 +17,8 @@ var FridaSession = class {
|
|
|
17
17
|
async attach(target) {
|
|
18
18
|
const availability = await this.getAvailability();
|
|
19
19
|
if (!availability.available) throw new Error(availability.reason ?? "Frida CLI is not available");
|
|
20
|
+
const probe = await this.runFridaCommand(target, "console.log(\"__frida_attach_ok__\");");
|
|
21
|
+
if (probe.error) throw new Error(probe.error);
|
|
20
22
|
const sessionId = randomUUID();
|
|
21
23
|
const record = {
|
|
22
24
|
id: sessionId,
|
|
@@ -53,13 +55,13 @@ var FridaSession = class {
|
|
|
53
55
|
session.status = "error";
|
|
54
56
|
session.lastError = result.error;
|
|
55
57
|
}
|
|
56
|
-
return [
|
|
58
|
+
return [];
|
|
57
59
|
}
|
|
58
60
|
async enumerateFunctions(moduleName) {
|
|
59
61
|
const session = this.requireActiveSession();
|
|
60
62
|
const safeModuleName = JSON.stringify(moduleName);
|
|
61
63
|
const result = await this.runFridaCommand(session.target, [
|
|
62
|
-
`const entries =
|
|
64
|
+
`const entries = Process.getModuleByName(${safeModuleName}).enumerateExports()`,
|
|
63
65
|
".filter(function (entry) { return entry.type === \"function\"; })",
|
|
64
66
|
".map(function (entry) {",
|
|
65
67
|
" return { name: entry.name, address: String(entry.address), size: 0 };",
|
|
@@ -72,15 +74,13 @@ var FridaSession = class {
|
|
|
72
74
|
session.status = "error";
|
|
73
75
|
session.lastError = result.error;
|
|
74
76
|
}
|
|
75
|
-
return [
|
|
76
|
-
name: `${moduleName}!<unknown>`,
|
|
77
|
-
address: "0x0",
|
|
78
|
-
size: 0
|
|
79
|
-
}];
|
|
77
|
+
return [];
|
|
80
78
|
}
|
|
81
79
|
async findSymbols(pattern) {
|
|
82
80
|
const session = this.requireActiveSession();
|
|
83
|
-
const
|
|
81
|
+
const trimmedPattern = pattern.trim();
|
|
82
|
+
const resolvedPattern = trimmedPattern.includes(":") ? trimmedPattern : trimmedPattern.includes("!") ? `exports:${trimmedPattern}` : `exports:*!${trimmedPattern}*`;
|
|
83
|
+
const matchPattern = JSON.stringify(resolvedPattern);
|
|
84
84
|
const result = await this.runFridaCommand(session.target, [
|
|
85
85
|
"const resolver = new ApiResolver(\"module\");",
|
|
86
86
|
`const matches = resolver.enumerateMatches(${matchPattern});`,
|
|
@@ -97,11 +97,7 @@ var FridaSession = class {
|
|
|
97
97
|
session.status = "error";
|
|
98
98
|
session.lastError = result.error;
|
|
99
99
|
}
|
|
100
|
-
return [
|
|
101
|
-
name: pattern,
|
|
102
|
-
address: "0x0",
|
|
103
|
-
demangled: pattern
|
|
104
|
-
}];
|
|
100
|
+
return [];
|
|
105
101
|
}
|
|
106
102
|
listSessions() {
|
|
107
103
|
return Array.from(this.sessions.values()).map((session) => ({
|
|
@@ -130,6 +126,14 @@ var FridaSession = class {
|
|
|
130
126
|
hasSession(sessionId) {
|
|
131
127
|
return this.sessions.has(sessionId);
|
|
132
128
|
}
|
|
129
|
+
getSessionDiagnostics(sessionId) {
|
|
130
|
+
const session = this.sessions.get(sessionId);
|
|
131
|
+
if (!session) return;
|
|
132
|
+
return {
|
|
133
|
+
status: session.status,
|
|
134
|
+
lastError: session.lastError
|
|
135
|
+
};
|
|
136
|
+
}
|
|
133
137
|
getActiveSessionRecord() {
|
|
134
138
|
if (!this.activeSessionId) return;
|
|
135
139
|
return this.sessions.get(this.activeSessionId);
|
|
@@ -183,18 +187,6 @@ var FridaSession = class {
|
|
|
183
187
|
if (target.includes("/") || target.includes("\\")) return ["-f", target];
|
|
184
188
|
return ["-n", target];
|
|
185
189
|
}
|
|
186
|
-
createFallbackModule(target) {
|
|
187
|
-
return {
|
|
188
|
-
name: this.extractSimpleName(target),
|
|
189
|
-
base: "0x0",
|
|
190
|
-
size: 0,
|
|
191
|
-
path: target
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
extractSimpleName(target) {
|
|
195
|
-
const lastPart = target.split(/[\\/]/).filter((part) => part.length > 0).at(-1);
|
|
196
|
-
return lastPart && lastPart.length > 0 ? lastPart : target;
|
|
197
|
-
}
|
|
198
190
|
parseModuleList(output) {
|
|
199
191
|
const payload = this.extractJsonPayload(output);
|
|
200
192
|
if (!Array.isArray(payload)) return [];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//#region src/server/registry/bind-helpers.ts
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve a dependency by key with a runtime guard.
|
|
4
|
+
* The caller specifies the expected type via the generic parameter.
|
|
5
|
+
*/
|
|
6
|
+
function getDep(deps, key) {
|
|
7
|
+
const value = deps[key];
|
|
8
|
+
if (!value) throw new Error(`[registry] Missing dependency: "${key}". Is the domain enabled?`);
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Create a `bind` function that extracts the handler from `deps[depKey]`
|
|
13
|
+
* and delegates to `invoke(handler, args)`.
|
|
14
|
+
*
|
|
15
|
+
* This preserves full type safety within each manifest while the global
|
|
16
|
+
* deps container stays dynamically keyed.
|
|
17
|
+
*/
|
|
18
|
+
function bindByDepKey(depKey, invoke) {
|
|
19
|
+
return (deps) => (args) => invoke(getDep(deps, depKey), args);
|
|
20
|
+
}
|
|
21
|
+
function bindMethodByDepKey(depKey, method, options) {
|
|
22
|
+
return bindByDepKey(depKey, async (handler, args) => {
|
|
23
|
+
const invoke = handler[method];
|
|
24
|
+
const callArgs = options?.mapArgs ? options.mapArgs(args) : [args];
|
|
25
|
+
const result = await invoke.apply(handler, callArgs);
|
|
26
|
+
return options?.wrapResult ? options.wrapResult(result) : result;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function defineMethodRegistrations(options) {
|
|
30
|
+
const { domain, depKey, lookup, entries, wrapResult } = options;
|
|
31
|
+
return entries.map((entry) => ({
|
|
32
|
+
tool: lookup(entry.tool),
|
|
33
|
+
domain,
|
|
34
|
+
...entry.profiles ? { profiles: entry.profiles } : {},
|
|
35
|
+
bind: "mapArgs" in entry ? bindMethodByDepKey(depKey, entry.method, {
|
|
36
|
+
wrapResult,
|
|
37
|
+
mapArgs: entry.mapArgs
|
|
38
|
+
}) : bindMethodByDepKey(depKey, entry.method, { wrapResult })
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { defineMethodRegistrations as n, bindByDepKey as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-CjcI7cDX.mjs";
|
|
2
|
-
import { a as getTlsKeyLogDir } from "./outputPaths-
|
|
2
|
+
import { a as getTlsKeyLogDir } from "./outputPaths-um7lCRY3.mjs";
|
|
3
3
|
import { createDecipheriv, randomUUID } from "node:crypto";
|
|
4
4
|
import { existsSync, readFileSync } from "node:fs";
|
|
5
5
|
import { dirname, resolve } from "node:path";
|