@jshookmcp/jshook 0.2.8 → 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 +36 -5
- package/README.zh.md +36 -5
- package/dist/{AntiCheatDetector-S8VRj-dD.mjs → AntiCheatDetector-CqGDXmfc.mjs} +160 -54
- package/dist/{CodeInjector-4Z3ngPoX.mjs → CodeInjector-BdjRfNx7.mjs} +5 -5
- package/dist/ConsoleMonitor-DykL3IAw.mjs +2269 -0
- package/dist/{DarwinAPI-B8hg_yhz.mjs → DarwinAPI-ETyy0xyo.mjs} +1 -1
- package/dist/DetailedDataManager-HT49OrvF.mjs +217 -0
- package/dist/EventBus-DFKvADm3.mjs +141 -0
- package/dist/EvidenceGraphBridge-318Oi0Lf.mjs +153 -0
- package/dist/{ExtensionManager-D5-bO9D8.mjs → ExtensionManager-BDMsY2Dz.mjs} +27 -13
- package/dist/{FingerprintManager-BVxFJL2-.mjs → FingerprintManager-BN4UQWnX.mjs} +1 -1
- package/dist/{HardwareBreakpoint-DK1yjWkV.mjs → HardwareBreakpoint-Cc2AFq1Y.mjs} +3 -3
- package/dist/{HeapAnalyzer-CEbo10xU.mjs → HeapAnalyzer-DruMgsgj.mjs} +21 -21
- package/dist/HookGeneratorBuilders.core.generators.storage-CTbB4Lcx.mjs +566 -0
- package/dist/InstrumentationSession-DLH0vd-z.mjs +244 -0
- package/dist/{MemoryController-DdtnBdD4.mjs → MemoryController-CMtviNW_.mjs} +3 -3
- package/dist/{MemoryScanSession-RMixN3bX.mjs → MemoryScanSession-ITgb_NMi.mjs} +81 -78
- package/dist/{MemoryScanner-QjK4ld0B.mjs → MemoryScanner-CiL7Z3ey.mjs} +50 -21
- package/dist/{NativeMemoryManager.impl-CB6gJ0NM.mjs → NativeMemoryManager.impl-D9Lkovvn.mjs} +20 -56
- package/dist/{NativeMemoryManager.utils-BML4q1ry.mjs → NativeMemoryManager.utils-BBlAixF5.mjs} +1 -1
- package/dist/{PEAnalyzer-CK0xe0Fs.mjs → PEAnalyzer-DMQ44gen.mjs} +16 -16
- package/dist/PageController-BPJNqqBN.mjs +431 -0
- package/dist/{PointerChainEngine-Cd73qu5b.mjs → PointerChainEngine-K7wN8Z-w.mjs} +10 -7
- package/dist/PrerequisiteError-TuyZIs6n.mjs +20 -0
- package/dist/ProcessRegistry-zGg12QbE.mjs +74 -0
- package/dist/ResponseBuilder-CJXWmWNw.mjs +143 -0
- package/dist/ReverseEvidenceGraph-C02-gXOh.mjs +269 -0
- package/dist/ScriptManager-ZuWD-0Jg.mjs +3003 -0
- package/dist/{Speedhack-CeF0XmEz.mjs → Speedhack-D-z0umeT.mjs} +2 -2
- package/dist/{StructureAnalyzer-D4GkMduU.mjs → StructureAnalyzer-Cav5AVSL.mjs} +9 -6
- package/dist/ToolCatalog-5OJdMiF0.mjs +582 -0
- package/dist/ToolError-jh9whhMd.mjs +15 -0
- package/dist/ToolProbe-DbCFGyrg.mjs +45 -0
- package/dist/ToolRegistry-B9krbTtI.mjs +180 -0
- package/dist/ToolRouter.policy-BGDAGyeH.mjs +344 -0
- package/dist/TraceRecorder-B41Z5XBj.mjs +1286 -0
- package/dist/{Win32API-Bc0QnQsN.mjs → Win32API-C2kjj0ze.mjs} +19 -13
- package/dist/{Win32Debug-DUHt9XUn.mjs → Win32Debug-CKrGOTpo.mjs} +3 -3
- package/dist/WorkflowEngine-DJ6M4opp.mjs +569 -0
- package/dist/analysis-BHeJW2Nb.mjs +1234 -0
- package/dist/antidebug-BRKeyt27.mjs +1081 -0
- package/dist/artifactRetention-CPXkUJXp.mjs +598 -0
- package/dist/artifacts-DkfosXH3.mjs +59 -0
- package/dist/authorization-schema-DRqyJMSk.mjs +31 -0
- package/dist/betterSqlite3-DLSBZodi.mjs +74 -0
- package/dist/binary-instrument--V3MAhJ4.mjs +971 -0
- package/dist/bind-helpers-ClV34xdn.mjs +42 -0
- package/dist/boringssl-inspector-Bo_LOLaS.mjs +180 -0
- package/dist/browser-Dx3_S2cG.mjs +4369 -0
- package/dist/capabilities-CcHlvWgK.mjs +33 -0
- package/dist/concurrency-Drev_Vz9.mjs +41 -0
- package/dist/{constants-CCvsN80K.mjs → constants-CDZLOoVv.mjs} +105 -48
- package/dist/coordination-DgItD9DL.mjs +259 -0
- package/dist/debugger-RS3RSAqs.mjs +1288 -0
- package/dist/definitions-BEoYofW5.mjs +47 -0
- package/dist/definitions-BRaefg3u.mjs +365 -0
- package/dist/definitions-BbkvZkiv.mjs +96 -0
- package/dist/definitions-BtWSHJ3o.mjs +17 -0
- package/dist/definitions-C1gCHO0i.mjs +43 -0
- package/dist/definitions-CDOg_b-l.mjs +138 -0
- package/dist/definitions-CVPD9hzZ.mjs +54 -0
- package/dist/definitions-Cea8Lgl7.mjs +94 -0
- package/dist/definitions-DAgIyjxM.mjs +10 -0
- package/dist/definitions-DJA27nsL.mjs +66 -0
- package/dist/definitions-DKPFU3LW.mjs +25 -0
- package/dist/definitions-DPRpZQ96.mjs +47 -0
- package/dist/definitions-DUE5gmdn.mjs +18 -0
- package/dist/definitions-DYVjOtxa.mjs +26 -0
- package/dist/definitions-DcYLVLCo.mjs +37 -0
- package/dist/definitions-Pp5LI2H4.mjs +27 -0
- package/dist/definitions-j9KdHVNR.mjs +14 -0
- package/dist/definitions-uzkjBwa7.mjs +258 -0
- package/dist/definitions-va-AnLuQ.mjs +28 -0
- package/dist/encoding-DJeqHmpd.mjs +1079 -0
- package/dist/evidence-graph-bridge-DcYizFk2.mjs +136 -0
- package/dist/{factory-CibqTNC8.mjs → factory-C90tBff6.mjs} +41 -56
- package/dist/flat-target-session-Dgax2Cy3.mjs +29 -0
- package/dist/graphql-CoHrhweh.mjs +1197 -0
- package/dist/handlers-4jmR0nMs.mjs +898 -0
- package/dist/handlers-BAHPxcch.mjs +789 -0
- package/dist/handlers-BOs9b907.mjs +2600 -0
- package/dist/handlers-BWXEy6ef.mjs +917 -0
- package/dist/handlers-Bndn6QvE.mjs +111 -0
- package/dist/handlers-BqC4bD4s.mjs +681 -0
- package/dist/handlers-BtYq60bM2.mjs +276 -0
- package/dist/handlers-BzgcB4iv.mjs +799 -0
- package/dist/handlers-CRyRWj2b.mjs +859 -0
- package/dist/handlers-CVv2H1uq.mjs +592 -0
- package/dist/handlers-Dl5a7JS4.mjs +572 -0
- package/dist/handlers-Dx2d7jt7.mjs +2537 -0
- package/dist/handlers-Dz9PYsCa.mjs +2805 -0
- package/dist/handlers-HujRKC3b.mjs +661 -0
- package/dist/handlers.impl-XWXkQfyi.mjs +807 -0
- package/dist/hooks-B1B8NRHL.mjs +898 -0
- package/dist/index.mjs +491 -259
- package/dist/{logger-BmWzC2lM.mjs → logger-Dh_xb7_2.mjs} +14 -6
- package/dist/maintenance-PRMkLVRW.mjs +835 -0
- package/dist/manifest-67Bok-Si.mjs +58 -0
- package/dist/manifest-6lNTMZAB2.mjs +87 -0
- package/dist/manifest-B2duEHiH.mjs +90 -0
- package/dist/manifest-B6EY9Vm8.mjs +57 -0
- package/dist/manifest-B6nKSbyY.mjs +95 -0
- package/dist/manifest-BL8AQNPF.mjs +106 -0
- package/dist/manifest-BSZvJJmV.mjs +47 -0
- package/dist/manifest-BU7qzUyX.mjs +418 -0
- package/dist/manifest-Bl62e8WK.mjs +49 -0
- 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-C-xtsjS3.mjs +81 -0
- package/dist/manifest-CDYl7OhA.mjs +66 -0
- 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-D7YZM_2e.mjs +194 -0
- package/dist/manifest-DE_VrAeQ.mjs +314 -0
- package/dist/manifest-DGsXSCpT.mjs +39 -0
- package/dist/manifest-DJ2vfEuW.mjs +156 -0
- package/dist/manifest-DPXDYhEu.mjs +80 -0
- package/dist/manifest-Dd4fQb0a.mjs +322 -0
- package/dist/manifest-Deq6opGg.mjs +223 -0
- package/dist/manifest-DfJTafJK.mjs +37 -0
- package/dist/manifest-DgOdgN_j.mjs +50 -0
- package/dist/manifest-DlbMW4v4.mjs +47 -0
- package/dist/manifest-DmVfbH0w.mjs +374 -0
- 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-cEJU1v0Z.mjs +129 -0
- package/dist/manifest-wOl5XLB12.mjs +112 -0
- package/dist/modules-tZozf0LQ.mjs +10635 -0
- package/dist/mojo-ipc-DXNEXEqb.mjs +640 -0
- package/dist/network-CPVvwvFg.mjs +3852 -0
- package/dist/{artifacts-BbdOMET5.mjs → outputPaths-um7lCRY3.mjs} +219 -216
- package/dist/parse-args-B4cY5Vx5.mjs +39 -0
- package/dist/platform-CYeFoTWp.mjs +2161 -0
- package/dist/process-BTbgcVc6.mjs +1306 -0
- package/dist/proxy-r8YN6nP1.mjs +192 -0
- package/dist/registry-Bl8ZQW61.mjs +34 -0
- package/dist/response-CWhh2aLo.mjs +34 -0
- package/dist/server/plugin-api.mjs +2 -2
- package/dist/shared-state-board-BoZnSoj-.mjs +586 -0
- package/dist/sourcemap-BIDHUVXy.mjs +934 -0
- package/dist/ssrf-policy-Dsqd-DTX.mjs +166 -0
- package/dist/streaming-Dal6utPp.mjs +725 -0
- package/dist/tool-builder-BHJp32mV.mjs +186 -0
- package/dist/transform-DRVgGG90.mjs +1011 -0
- package/dist/types-Bx92KJfT.mjs +4 -0
- package/dist/wasm-BYx5UOeG.mjs +1044 -0
- package/dist/webcrack-Be0_FccV.mjs +747 -0
- package/dist/workflow-BpuKEtvn.mjs +725 -0
- package/package.json +82 -49
- package/dist/ExtensionManager-CPTJhHFg.mjs +0 -2
- package/dist/ToolCatalog-Bq4V2sbJ.mjs +0 -67201
- package/dist/{CacheAdapters-CzFNpD9a.mjs → CacheAdapters-jJFy20G-.mjs} +0 -0
- package/dist/{StealthVerifier-BzBCFiwx.mjs → StealthVerifier-BWmPgQsv.mjs} +0 -0
- package/dist/{VersionDetector-CNXcvD46.mjs → VersionDetector-K3V4vGsw.mjs} +0 -0
- package/dist/{formatAddress-ChCSIRWT.mjs → formatAddress-nnMvEohD.mjs} +0 -0
- package/dist/{types-BBjOqye-.mjs → types-DDBWs9UP.mjs} +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./chunk-CjcI7cDX.mjs";
|
|
2
|
-
import { t as logger } from "./logger-
|
|
2
|
+
import { t as logger } from "./logger-Dh_xb7_2.mjs";
|
|
3
3
|
import koffi from "koffi";
|
|
4
4
|
//#region src/native/Win32API.ts
|
|
5
5
|
/**
|
|
@@ -139,11 +139,17 @@ function getPsapi() {
|
|
|
139
139
|
}
|
|
140
140
|
return psapi;
|
|
141
141
|
}
|
|
142
|
+
function toPointerBigInt(value) {
|
|
143
|
+
if (value === null || value === void 0) return 0n;
|
|
144
|
+
if (typeof value === "bigint") return value;
|
|
145
|
+
if (typeof value === "number") return BigInt(value);
|
|
146
|
+
return koffi.address(value);
|
|
147
|
+
}
|
|
142
148
|
/**
|
|
143
149
|
* Open a process handle
|
|
144
150
|
*/
|
|
145
151
|
function OpenProcess(dwDesiredAccess, bInheritHandle, dwProcessId) {
|
|
146
|
-
return getKernel32().func("void * OpenProcess(uint32, int, uint32)")(dwDesiredAccess, bInheritHandle ? 1 : 0, dwProcessId);
|
|
152
|
+
return toPointerBigInt(getKernel32().func("void * OpenProcess(uint32, int, uint32)")(dwDesiredAccess, bInheritHandle ? 1 : 0, dwProcessId));
|
|
147
153
|
}
|
|
148
154
|
/**
|
|
149
155
|
* Close a handle
|
|
@@ -155,7 +161,7 @@ function CloseHandle(hObject) {
|
|
|
155
161
|
* Read process memory - returns buffer directly
|
|
156
162
|
*/
|
|
157
163
|
function ReadProcessMemory(hProcess, lpBaseAddress, size) {
|
|
158
|
-
const fn = getKernel32().func("int ReadProcessMemory(void *, void *, _Out_ uint8_t
|
|
164
|
+
const fn = getKernel32().func("int ReadProcessMemory(void *, void *, _Out_ uint8_t *, size_t, _Out_ size_t *)");
|
|
159
165
|
const buffer = Buffer.alloc(size);
|
|
160
166
|
const bytesReadBuf = Buffer.alloc(8);
|
|
161
167
|
if (fn(hProcess, lpBaseAddress, buffer, BigInt(size), bytesReadBuf) === 0) {
|
|
@@ -168,7 +174,7 @@ function ReadProcessMemory(hProcess, lpBaseAddress, size) {
|
|
|
168
174
|
* Write process memory
|
|
169
175
|
*/
|
|
170
176
|
function WriteProcessMemory(hProcess, lpBaseAddress, data) {
|
|
171
|
-
const fn = getKernel32().func("int WriteProcessMemory(void *, void *, uint8_t
|
|
177
|
+
const fn = getKernel32().func("int WriteProcessMemory(void *, void *, uint8_t *, size_t, _Out_ size_t *)");
|
|
172
178
|
const bytesWrittenBuf = Buffer.alloc(8);
|
|
173
179
|
if (fn(hProcess, lpBaseAddress, data, BigInt(data.length), bytesWrittenBuf) === 0) {
|
|
174
180
|
const error = GetLastError();
|
|
@@ -181,7 +187,7 @@ function WriteProcessMemory(hProcess, lpBaseAddress, data) {
|
|
|
181
187
|
* Uses Buffer parsing to avoid koffi struct registration issues
|
|
182
188
|
*/
|
|
183
189
|
function VirtualQueryEx(hProcess, lpAddress) {
|
|
184
|
-
const fn = getKernel32().func("size_t VirtualQueryEx(void *, void *, _Out_ uint8_t
|
|
190
|
+
const fn = getKernel32().func("size_t VirtualQueryEx(void *, void *, _Out_ uint8_t *, size_t)");
|
|
185
191
|
const structSize = 48;
|
|
186
192
|
const buffer = Buffer.alloc(structSize);
|
|
187
193
|
const result = fn(hProcess, lpAddress, buffer, BigInt(structSize));
|
|
@@ -217,7 +223,7 @@ function VirtualProtectEx(hProcess, lpAddress, dwSize, flNewProtect) {
|
|
|
217
223
|
* Allocate memory in another process
|
|
218
224
|
*/
|
|
219
225
|
function VirtualAllocEx(hProcess, lpAddress, dwSize, flAllocationType, flProtect) {
|
|
220
|
-
return getKernel32().func("void * VirtualAllocEx(void *, void *, size_t, uint32, uint32)")(hProcess, lpAddress, BigInt(dwSize), flAllocationType, flProtect);
|
|
226
|
+
return toPointerBigInt(getKernel32().func("void * VirtualAllocEx(void *, void *, size_t, uint32, uint32)")(hProcess, lpAddress, BigInt(dwSize), flAllocationType, flProtect));
|
|
221
227
|
}
|
|
222
228
|
/**
|
|
223
229
|
* Free memory in another process
|
|
@@ -232,7 +238,7 @@ function CreateRemoteThread(hProcess, lpStartAddress, lpParameter) {
|
|
|
232
238
|
const fn = getKernel32().func("void * CreateRemoteThread(void *, void *, size_t, void *, void *, uint32, _Out_ uint32 *)");
|
|
233
239
|
const threadIdBuf = Buffer.alloc(4);
|
|
234
240
|
return {
|
|
235
|
-
handle: fn(hProcess, null, 0n, lpStartAddress, lpParameter, 0, threadIdBuf),
|
|
241
|
+
handle: toPointerBigInt(fn(hProcess, null, 0n, lpStartAddress, lpParameter, 0, threadIdBuf)),
|
|
236
242
|
threadId: threadIdBuf.readUInt32LE(0)
|
|
237
243
|
};
|
|
238
244
|
}
|
|
@@ -240,13 +246,13 @@ function CreateRemoteThread(hProcess, lpStartAddress, lpParameter) {
|
|
|
240
246
|
* Get module handle by name
|
|
241
247
|
*/
|
|
242
248
|
function GetModuleHandle(lpModuleName) {
|
|
243
|
-
return getKernel32().func("void * GetModuleHandleA(char *)")(lpModuleName);
|
|
249
|
+
return toPointerBigInt(getKernel32().func("void * GetModuleHandleA(char *)")(lpModuleName));
|
|
244
250
|
}
|
|
245
251
|
/**
|
|
246
252
|
* Get function address from module
|
|
247
253
|
*/
|
|
248
254
|
function GetProcAddress(hModule, lpProcName) {
|
|
249
|
-
return getKernel32().func("void * GetProcAddress(void *, char *)")(hModule, lpProcName);
|
|
255
|
+
return toPointerBigInt(getKernel32().func("void * GetProcAddress(void *, char *)")(hModule, lpProcName));
|
|
250
256
|
}
|
|
251
257
|
/**
|
|
252
258
|
* Get last error code
|
|
@@ -269,7 +275,7 @@ function NtQueryInformationProcess(hProcess, processInformationClass) {
|
|
|
269
275
|
* Enumerate process modules
|
|
270
276
|
*/
|
|
271
277
|
function EnumProcessModules(hProcess, maxModules = 1024) {
|
|
272
|
-
const fn = getPsapi().func("int EnumProcessModules(void *, _Out_ void
|
|
278
|
+
const fn = getPsapi().func("int EnumProcessModules(void *, _Out_ void *, uint32, _Out_ uint32 *)");
|
|
273
279
|
const moduleBuf = Buffer.alloc(maxModules * 8);
|
|
274
280
|
const neededBuf = Buffer.alloc(4);
|
|
275
281
|
const result = fn(hProcess, moduleBuf, maxModules * 8, neededBuf);
|
|
@@ -287,7 +293,7 @@ function EnumProcessModules(hProcess, maxModules = 1024) {
|
|
|
287
293
|
* Get module base name
|
|
288
294
|
*/
|
|
289
295
|
function GetModuleBaseName(hProcess, hModule, maxSize = 260) {
|
|
290
|
-
const fn = getPsapi().func("uint32 GetModuleBaseNameA(void *, void *, _Out_ char
|
|
296
|
+
const fn = getPsapi().func("uint32 GetModuleBaseNameA(void *, void *, _Out_ char *, uint32)");
|
|
291
297
|
const buffer = Buffer.alloc(maxSize);
|
|
292
298
|
fn(hProcess, hModule, buffer, maxSize);
|
|
293
299
|
let len = 0;
|
|
@@ -299,7 +305,7 @@ function GetModuleBaseName(hProcess, hModule, maxSize = 260) {
|
|
|
299
305
|
* Returns null when the API is unavailable or the module path cannot be resolved.
|
|
300
306
|
*/
|
|
301
307
|
function GetModuleFileNameEx(hProcess, hModule, maxSize = 32768) {
|
|
302
|
-
const fn = getPsapi().func("uint32 GetModuleFileNameExA(void *, void *, _Out_ char
|
|
308
|
+
const fn = getPsapi().func("uint32 GetModuleFileNameExA(void *, void *, _Out_ char *, uint32)");
|
|
303
309
|
const buffer = Buffer.alloc(maxSize);
|
|
304
310
|
const result = fn(hProcess, hModule, buffer, maxSize);
|
|
305
311
|
if (typeof result !== "number" || result <= 0) return null;
|
|
@@ -312,7 +318,7 @@ function GetModuleFileNameEx(hProcess, hModule, maxSize = 32768) {
|
|
|
312
318
|
* Uses Buffer parsing to avoid koffi struct registration issues
|
|
313
319
|
*/
|
|
314
320
|
function GetModuleInformation(hProcess, hModule) {
|
|
315
|
-
const fn = getPsapi().func("int GetModuleInformation(void *, void *, _Out_ uint8_t
|
|
321
|
+
const fn = getPsapi().func("int GetModuleInformation(void *, void *, _Out_ uint8_t *, uint32)");
|
|
316
322
|
const buffer = Buffer.alloc(24);
|
|
317
323
|
const result = fn(hProcess, hModule, buffer, 24);
|
|
318
324
|
const info = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as logger } from "./logger-
|
|
2
|
-
import { r as GetLastError, t as CloseHandle } from "./Win32API-
|
|
1
|
+
import { t as logger } from "./logger-Dh_xb7_2.mjs";
|
|
2
|
+
import { r as GetLastError, t as CloseHandle } from "./Win32API-C2kjj0ze.mjs";
|
|
3
3
|
import koffi from "koffi";
|
|
4
4
|
//#region src/native/Win32Debug.ts
|
|
5
5
|
/**
|
|
@@ -156,7 +156,7 @@ function DebugSetProcessKillOnExit(killOnExit) {
|
|
|
156
156
|
getKernel32().func("int DebugSetProcessKillOnExit(int)")(killOnExit ? 1 : 0);
|
|
157
157
|
}
|
|
158
158
|
function WaitForDebugEvent(timeoutMs) {
|
|
159
|
-
const fn = getKernel32().func("int WaitForDebugEvent(_Out_ uint8_t
|
|
159
|
+
const fn = getKernel32().func("int WaitForDebugEvent(_Out_ uint8_t *, uint32)");
|
|
160
160
|
const buf = Buffer.alloc(176);
|
|
161
161
|
if (fn(buf, timeoutMs) === 0) return null;
|
|
162
162
|
const info = {
|