@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,7 +1,8 @@
|
|
|
1
1
|
import { n as __require } from "./chunk-CjcI7cDX.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { a as argString, r as argNumber } from "./parse-args-
|
|
4
|
-
import "./
|
|
2
|
+
import { Ut as MOJO_MONITOR_TIMEOUT_MS } from "./constants-CDZLOoVv.mjs";
|
|
3
|
+
import { a as argString, r as argNumber } from "./parse-args-B4cY5Vx5.mjs";
|
|
4
|
+
import { n as capabilityReport, t as capabilityFailure } from "./capabilities-CcHlvWgK.mjs";
|
|
5
|
+
import "./manifest-6lNTMZAB2.mjs";
|
|
5
6
|
import { execFile, spawn } from "node:child_process";
|
|
6
7
|
//#region src/modules/mojo-ipc/MojoMonitor.ts
|
|
7
8
|
function getDefaultInterfaces() {
|
|
@@ -91,9 +92,11 @@ rpc.exports = {
|
|
|
91
92
|
var MojoMonitor = class {
|
|
92
93
|
active = false;
|
|
93
94
|
simulationMode = false;
|
|
95
|
+
fridaProbeSucceeded = false;
|
|
94
96
|
deviceId;
|
|
95
97
|
messages = [];
|
|
96
98
|
interfaces = /* @__PURE__ */ new Map();
|
|
99
|
+
observedInterfaceNames = /* @__PURE__ */ new Set();
|
|
97
100
|
availability = {
|
|
98
101
|
available: false,
|
|
99
102
|
fridaAvailable: false,
|
|
@@ -101,7 +104,7 @@ var MojoMonitor = class {
|
|
|
101
104
|
reason: "Not yet initialized. Call start() to probe availability."
|
|
102
105
|
};
|
|
103
106
|
constructor() {
|
|
104
|
-
|
|
107
|
+
this.resetInterfaces();
|
|
105
108
|
}
|
|
106
109
|
isAvailable() {
|
|
107
110
|
return this.availability.available;
|
|
@@ -109,9 +112,19 @@ var MojoMonitor = class {
|
|
|
109
112
|
getUnavailableReason() {
|
|
110
113
|
return this.availability.reason;
|
|
111
114
|
}
|
|
115
|
+
getAvailabilitySnapshot() {
|
|
116
|
+
return { ...this.availability };
|
|
117
|
+
}
|
|
118
|
+
async probeAvailability() {
|
|
119
|
+
this.availability = await detectAvailability();
|
|
120
|
+
return this.getAvailabilitySnapshot();
|
|
121
|
+
}
|
|
112
122
|
isSimulationMode() {
|
|
113
123
|
return this.simulationMode;
|
|
114
124
|
}
|
|
125
|
+
didFridaProbeSucceed() {
|
|
126
|
+
return this.fridaProbeSucceeded;
|
|
127
|
+
}
|
|
115
128
|
setSimulationMode(enabled) {
|
|
116
129
|
this.simulationMode = enabled;
|
|
117
130
|
}
|
|
@@ -124,20 +137,22 @@ var MojoMonitor = class {
|
|
|
124
137
|
async start(deviceId) {
|
|
125
138
|
this.deviceId = deviceId;
|
|
126
139
|
this.availability = await detectAvailability();
|
|
140
|
+
this.resetInterfaces();
|
|
141
|
+
this.simulationMode = false;
|
|
142
|
+
this.fridaProbeSucceeded = false;
|
|
127
143
|
if (!this.availability.available) {
|
|
128
144
|
this.active = false;
|
|
129
145
|
return;
|
|
130
146
|
}
|
|
131
147
|
this.active = true;
|
|
132
|
-
this.resetPendingCounts();
|
|
133
148
|
if (this.availability.fridaCliAvailable) await this.captureWithFrida(deviceId);
|
|
134
149
|
else this.simulationMode = true;
|
|
135
150
|
}
|
|
136
151
|
async stop() {
|
|
137
152
|
this.active = false;
|
|
138
153
|
this.deviceId = void 0;
|
|
139
|
-
this.
|
|
140
|
-
this.
|
|
154
|
+
this.fridaProbeSucceeded = false;
|
|
155
|
+
this.resetInterfaces();
|
|
141
156
|
}
|
|
142
157
|
async captureMessages(filter = {}) {
|
|
143
158
|
if (!this.active) return [];
|
|
@@ -157,12 +172,23 @@ var MojoMonitor = class {
|
|
|
157
172
|
pendingMessages: item.pendingMessages
|
|
158
173
|
})).toSorted((left, right) => left.name.localeCompare(right.name));
|
|
159
174
|
}
|
|
175
|
+
hasObservedInterfaces() {
|
|
176
|
+
return this.observedInterfaceNames.size > 0;
|
|
177
|
+
}
|
|
178
|
+
getObservedInterfaceCount() {
|
|
179
|
+
return this.observedInterfaceNames.size;
|
|
180
|
+
}
|
|
181
|
+
getInterfaceCatalogSource() {
|
|
182
|
+
if (this.observedInterfaceNames.size === 0) return "seeded-defaults";
|
|
183
|
+
if (this.observedInterfaceNames.size >= this.interfaces.size) return "observed";
|
|
184
|
+
return "mixed";
|
|
185
|
+
}
|
|
160
186
|
async getMessages(options) {
|
|
161
187
|
if (!this.active) return {
|
|
162
188
|
messages: [],
|
|
163
189
|
totalAvailable: 0,
|
|
164
190
|
filtered: false,
|
|
165
|
-
|
|
191
|
+
simulation: this.simulationMode
|
|
166
192
|
};
|
|
167
193
|
const filter = {};
|
|
168
194
|
if (options?.interfaceName) filter.interfaceName = options.interfaceName;
|
|
@@ -172,12 +198,13 @@ var MojoMonitor = class {
|
|
|
172
198
|
messages: allMessages.slice(0, limit),
|
|
173
199
|
totalAvailable: allMessages.length,
|
|
174
200
|
filtered: !!options?.interfaceName,
|
|
175
|
-
|
|
201
|
+
simulation: this.simulationMode
|
|
176
202
|
};
|
|
177
203
|
}
|
|
178
204
|
recordMessage(message, version = 1) {
|
|
179
205
|
if (!this.active) return;
|
|
180
206
|
this.messages.push({ ...message });
|
|
207
|
+
this.observedInterfaceNames.add(message.interfaceName);
|
|
181
208
|
const existing = this.interfaces.get(message.interfaceName);
|
|
182
209
|
if (existing) {
|
|
183
210
|
existing.pendingMessages += 1;
|
|
@@ -205,20 +232,22 @@ var MojoMonitor = class {
|
|
|
205
232
|
windowsHide: true
|
|
206
233
|
}, (error) => {
|
|
207
234
|
if (error) {
|
|
208
|
-
this.simulationMode = true;
|
|
209
235
|
reject(error);
|
|
210
236
|
return;
|
|
211
237
|
}
|
|
212
|
-
this.simulationMode = false;
|
|
213
238
|
resolve();
|
|
214
239
|
}).stdin?.end(script);
|
|
240
|
+
}).then(() => {
|
|
241
|
+
this.fridaProbeSucceeded = true;
|
|
215
242
|
}).catch(() => {
|
|
216
|
-
this.
|
|
243
|
+
this.fridaProbeSucceeded = false;
|
|
217
244
|
});
|
|
245
|
+
this.simulationMode = true;
|
|
218
246
|
}
|
|
219
247
|
recomputePendingCounts() {
|
|
220
248
|
this.resetPendingCounts();
|
|
221
249
|
for (const message of this.messages) {
|
|
250
|
+
this.observedInterfaceNames.add(message.interfaceName);
|
|
222
251
|
const item = this.interfaces.get(message.interfaceName);
|
|
223
252
|
if (item) item.pendingMessages += 1;
|
|
224
253
|
else this.interfaces.set(message.interfaceName, {
|
|
@@ -231,6 +260,12 @@ var MojoMonitor = class {
|
|
|
231
260
|
resetPendingCounts() {
|
|
232
261
|
for (const item of this.interfaces.values()) item.pendingMessages = 0;
|
|
233
262
|
}
|
|
263
|
+
resetInterfaces() {
|
|
264
|
+
this.messages.length = 0;
|
|
265
|
+
this.interfaces.clear();
|
|
266
|
+
this.observedInterfaceNames.clear();
|
|
267
|
+
for (const item of getDefaultInterfaces()) this.interfaces.set(item.name, { ...item });
|
|
268
|
+
}
|
|
234
269
|
};
|
|
235
270
|
//#endregion
|
|
236
271
|
//#region src/modules/mojo-ipc/MojoDecoder.ts
|
|
@@ -417,14 +452,21 @@ var MojoDecoder = class {
|
|
|
417
452
|
};
|
|
418
453
|
//#endregion
|
|
419
454
|
//#region src/server/domains/mojo-ipc/handlers.impl.ts
|
|
420
|
-
function
|
|
455
|
+
function getMojoFix(reason) {
|
|
456
|
+
return reason.includes("JSHOOK_ENABLE_MOJO_IPC") ? "Unset JSHOOK_ENABLE_MOJO_IPC or set it to 1, then retry." : "Install Frida and ensure the Chromium target is running.";
|
|
457
|
+
}
|
|
458
|
+
function unavailablePayload(reason, tool) {
|
|
421
459
|
return {
|
|
422
|
-
|
|
423
|
-
available: false,
|
|
424
|
-
action,
|
|
460
|
+
...capabilityFailure(tool, "mojo_ipc_monitoring", reason, getMojoFix(reason)),
|
|
425
461
|
error: reason
|
|
426
462
|
};
|
|
427
463
|
}
|
|
464
|
+
const LIVE_CAPTURE_REASON = "Current Mojo IPC backend only exposes a seeded interface catalog and simulated capture. Live Chromium Mojo hooks are not implemented in this build.";
|
|
465
|
+
const LIVE_CAPTURE_FIX = "No user-side fix is available in this build. Treat mojo_monitor/mojo_list_interfaces/mojo_messages_get as simulation-only until real Frida hooks are implemented.";
|
|
466
|
+
function getFridaProbeSucceeded(monitor) {
|
|
467
|
+
const maybeMonitor = monitor;
|
|
468
|
+
return typeof maybeMonitor.didFridaProbeSucceed === "function" ? maybeMonitor.didFridaProbeSucceed() : false;
|
|
469
|
+
}
|
|
428
470
|
var MojoIPCHandlers = class {
|
|
429
471
|
constructor(monitor, decoder, eventBus) {
|
|
430
472
|
this.monitor = monitor;
|
|
@@ -434,17 +476,82 @@ var MojoIPCHandlers = class {
|
|
|
434
476
|
async handleMojoMonitorDispatch(args) {
|
|
435
477
|
return String(args["action"] ?? "") === "stop" ? this.handleMojoMonitorStop() : this.handleMojoMonitorStart(args);
|
|
436
478
|
}
|
|
479
|
+
async handleMojoIpcCapabilities() {
|
|
480
|
+
const monitor = this.getMonitor();
|
|
481
|
+
const fridaProbeSucceeded = getFridaProbeSucceeded(monitor);
|
|
482
|
+
const availability = typeof monitor.probeAvailability === "function" ? await monitor.probeAvailability() : {
|
|
483
|
+
available: monitor.isAvailable(),
|
|
484
|
+
reason: monitor.getUnavailableReason(),
|
|
485
|
+
fridaAvailable: monitor.isAvailable(),
|
|
486
|
+
fridaCliAvailable: false
|
|
487
|
+
};
|
|
488
|
+
return capabilityReport("mojo_ipc_capabilities", [
|
|
489
|
+
{
|
|
490
|
+
capability: "mojo_ipc_monitoring",
|
|
491
|
+
status: availability.available ? "available" : "unavailable",
|
|
492
|
+
reason: availability.reason,
|
|
493
|
+
fix: availability.available ? void 0 : getMojoFix(availability.reason ?? ""),
|
|
494
|
+
details: {
|
|
495
|
+
tools: [
|
|
496
|
+
"mojo_monitor",
|
|
497
|
+
"mojo_list_interfaces",
|
|
498
|
+
"mojo_messages_get"
|
|
499
|
+
],
|
|
500
|
+
fridaAvailable: availability.fridaAvailable,
|
|
501
|
+
fridaCliAvailable: availability.fridaCliAvailable,
|
|
502
|
+
fridaProbeSucceeded,
|
|
503
|
+
active: monitor.isActive(),
|
|
504
|
+
simulationMode: monitor.isSimulationMode(),
|
|
505
|
+
interfaceCatalogSource: monitor.getInterfaceCatalogSource(),
|
|
506
|
+
observedInterfaceCount: monitor.getObservedInterfaceCount(),
|
|
507
|
+
liveCaptureImplemented: false
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
capability: "mojo_live_capture",
|
|
512
|
+
status: "unavailable",
|
|
513
|
+
reason: LIVE_CAPTURE_REASON,
|
|
514
|
+
fix: LIVE_CAPTURE_FIX,
|
|
515
|
+
details: {
|
|
516
|
+
tools: [
|
|
517
|
+
"mojo_monitor",
|
|
518
|
+
"mojo_list_interfaces",
|
|
519
|
+
"mojo_messages_get"
|
|
520
|
+
],
|
|
521
|
+
fridaAvailable: availability.fridaAvailable,
|
|
522
|
+
fridaCliAvailable: availability.fridaCliAvailable,
|
|
523
|
+
fridaProbeSucceeded,
|
|
524
|
+
active: monitor.isActive(),
|
|
525
|
+
simulationMode: monitor.isSimulationMode(),
|
|
526
|
+
interfaceCatalogSource: monitor.getInterfaceCatalogSource(),
|
|
527
|
+
observedInterfaceCount: monitor.getObservedInterfaceCount(),
|
|
528
|
+
fallbackMode: availability.available ? "simulation" : "none",
|
|
529
|
+
liveCaptureImplemented: false
|
|
530
|
+
}
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
capability: "mojo_payload_decode",
|
|
534
|
+
status: "available",
|
|
535
|
+
details: { tools: ["mojo_decode_message"] }
|
|
536
|
+
}
|
|
537
|
+
]);
|
|
538
|
+
}
|
|
437
539
|
async handleMojoMonitorStart(args) {
|
|
438
540
|
const monitor = this.getMonitor();
|
|
439
|
-
if (!monitor.isAvailable()) return unavailablePayload(monitor.getUnavailableReason() ?? "Mojo IPC monitoring is not available", "mojo_monitor");
|
|
440
541
|
const deviceId = argString(args, "deviceId");
|
|
441
542
|
await monitor.start(deviceId);
|
|
442
|
-
return
|
|
543
|
+
if (!monitor.isAvailable()) return unavailablePayload(monitor.getUnavailableReason() ?? "Mojo IPC monitoring is not available", "mojo_monitor");
|
|
544
|
+
const response = {
|
|
443
545
|
success: true,
|
|
444
546
|
available: true,
|
|
445
547
|
started: monitor.isActive(),
|
|
446
|
-
deviceId: monitor.getDeviceId() ?? null
|
|
548
|
+
deviceId: monitor.getDeviceId() ?? null,
|
|
549
|
+
simulation: monitor.isSimulationMode(),
|
|
550
|
+
interfaceCatalogSource: monitor.getInterfaceCatalogSource(),
|
|
551
|
+
observedInterfaceCount: monitor.getObservedInterfaceCount()
|
|
447
552
|
};
|
|
553
|
+
if (monitor.isSimulationMode()) response.warningMessage = "Mojo IPC monitor is running in simulation mode. Real Frida-backed message capture is not active.";
|
|
554
|
+
return response;
|
|
448
555
|
}
|
|
449
556
|
async handleMojoMonitorStop() {
|
|
450
557
|
const monitor = this.getMonitor();
|
|
@@ -453,7 +560,8 @@ var MojoIPCHandlers = class {
|
|
|
453
560
|
return {
|
|
454
561
|
success: true,
|
|
455
562
|
available: true,
|
|
456
|
-
started: false
|
|
563
|
+
started: false,
|
|
564
|
+
simulation: monitor.isSimulationMode()
|
|
457
565
|
};
|
|
458
566
|
}
|
|
459
567
|
async handleMojoDecodeMessage(args) {
|
|
@@ -473,13 +581,18 @@ var MojoIPCHandlers = class {
|
|
|
473
581
|
...unavailablePayload(monitor.getUnavailableReason() ?? "Mojo IPC monitoring is not available", "mojo_list_interfaces"),
|
|
474
582
|
interfaces: []
|
|
475
583
|
};
|
|
476
|
-
const
|
|
477
|
-
return {
|
|
584
|
+
const response = {
|
|
478
585
|
success: true,
|
|
479
586
|
available: true,
|
|
480
587
|
active: monitor.isActive(),
|
|
481
|
-
interfaces
|
|
588
|
+
interfaces: await monitor.listInterfaces(),
|
|
589
|
+
simulation: monitor.isSimulationMode(),
|
|
590
|
+
interfaceCatalogSource: monitor.getInterfaceCatalogSource(),
|
|
591
|
+
observedInterfaceCount: monitor.getObservedInterfaceCount()
|
|
482
592
|
};
|
|
593
|
+
if (monitor.getInterfaceCatalogSource() === "seeded-defaults") response.warningMessage = "Interface list currently comes from the seeded default catalog; no live observed Mojo interfaces have been captured yet.";
|
|
594
|
+
else if (monitor.isSimulationMode()) response.warningMessage = "Mojo IPC monitor is running in simulation mode. Interface counts may not reflect live traffic.";
|
|
595
|
+
return response;
|
|
483
596
|
}
|
|
484
597
|
async handleMojoMessagesGet(args) {
|
|
485
598
|
const monitor = this.getMonitor();
|
|
@@ -488,7 +601,7 @@ var MojoIPCHandlers = class {
|
|
|
488
601
|
messages: [],
|
|
489
602
|
totalAvailable: 0,
|
|
490
603
|
filtered: false,
|
|
491
|
-
|
|
604
|
+
simulation: true
|
|
492
605
|
};
|
|
493
606
|
const limit = argNumber(args, "limit");
|
|
494
607
|
const interfaceName = argString(args, "interface");
|
|
@@ -503,13 +616,15 @@ var MojoIPCHandlers = class {
|
|
|
503
616
|
messages: result.messages,
|
|
504
617
|
totalAvailable: result.totalAvailable,
|
|
505
618
|
filtered: result.filtered,
|
|
506
|
-
|
|
619
|
+
simulation: result.simulation,
|
|
620
|
+
interfaceCatalogSource: monitor.getInterfaceCatalogSource(),
|
|
621
|
+
observedInterfaceCount: monitor.getObservedInterfaceCount()
|
|
507
622
|
};
|
|
508
623
|
if (result.messages && Array.isArray(result.messages) && result.messages.length > 0) this.eventBus?.emit("mojo:message_captured", {
|
|
509
624
|
messageCount: result.messages.length,
|
|
510
625
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
511
626
|
});
|
|
512
|
-
if (monitor.isSimulationMode()) response.
|
|
627
|
+
if (monitor.isSimulationMode()) response.warningMessage = "Mojo IPC is operating in simulation mode. Messages are not captured from real Frida hooks. Install Frida for live IPC monitoring.";
|
|
513
628
|
return response;
|
|
514
629
|
}
|
|
515
630
|
getMonitor() {
|