@jshookmcp/jshook 0.3.0 → 0.3.2

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.
Files changed (346) hide show
  1. package/LICENSE +661 -661
  2. package/README.md +32 -49
  3. package/README.zh.md +32 -47
  4. package/dist/AntiCheatDetector-B6d4Qe9D.mjs +1 -0
  5. package/dist/BrowserSessionCoordinator-BJ-HOxo0.mjs +1 -0
  6. package/dist/CacheAdapters-CsNtQIR8.mjs +1 -0
  7. package/dist/CodeInjector-Cll_7bLJ.mjs +1 -0
  8. package/dist/ConsoleMonitor-CxDJV15E.mjs +306 -0
  9. package/dist/DOMInspector-C19J4zeq.mjs +95 -0
  10. package/dist/DarwinAPI-ZfQdpLNI.mjs +1 -0
  11. package/dist/DetailedDataManager-DmQ1LT-W.mjs +1 -0
  12. package/dist/EventBus-DL8iLA09.mjs +1 -0
  13. package/dist/EvidenceGraphBridge-BtbwXsLC.mjs +1 -0
  14. package/dist/ExtensionManager-BD724zkO.mjs +1 -0
  15. package/dist/ExtensionManager.tools-oVMJgPcN.mjs +1 -0
  16. package/dist/FingerprintManager-DT0EAUEo.mjs +1 -0
  17. package/dist/HardwareBreakpoint-BUfPdp0f.mjs +1 -0
  18. package/dist/HeapAnalyzer-B_aqY8oj.mjs +1 -0
  19. package/dist/{HookGeneratorBuilders.core.generators.storage-CTbB4Lcx.mjs → HookGeneratorBuilders.core.generators.storage-DzD6dIJd.mjs} +66 -101
  20. package/dist/InstrumentationSession-D_G1ZPyd.mjs +1 -0
  21. package/dist/MCPServer.search.handlers.domain-BbS-6LnX.mjs +1 -0
  22. package/dist/MemoryController-X1XNSn1n.mjs +2 -0
  23. package/dist/MemoryScanSession-DG_F-PjE.mjs +1 -0
  24. package/dist/MemoryScanner-g1_L1ub5.mjs +1 -0
  25. package/dist/NativeMemoryManager.impl-DniBe2wf.mjs +1 -0
  26. package/dist/NativeMemoryManager.utils-BHy1P_jM.mjs +1 -0
  27. package/dist/NetworkMonitor-B_-au6aV.mjs +185 -0
  28. package/dist/PEAnalyzer-yWQaGrcx.mjs +1 -0
  29. package/dist/PageController-Dfsm1_o7.mjs +1 -0
  30. package/dist/PointerChainEngine-BhCUkmxY.mjs +1 -0
  31. package/dist/PrerequisiteError-BjCQA-gK.mjs +1 -0
  32. package/dist/ProcessRegistry-C-bN48oR.mjs +1 -0
  33. package/dist/ResponseBuilder-BfWP-uaT.mjs +1 -0
  34. package/dist/ReverseEvidenceGraph-BhSYYdiI.mjs +2 -0
  35. package/dist/RingBuffer-Dm54ELKT.mjs +1 -0
  36. package/dist/ScriptManager-LWGPTdvD.mjs +7 -0
  37. package/dist/ServerRuntimeState-D2bWHqEE.mjs +1 -0
  38. package/dist/Speedhack-yseDPSZ9.mjs +1 -0
  39. package/dist/StealthVerifier-BmcxfwSF.mjs +1 -0
  40. package/dist/StructureAnalyzer-C5lpuZkg.mjs +2 -0
  41. package/dist/ToolCatalog-CYdD9F5f.mjs +1 -0
  42. package/dist/ToolError-DWU_z7gp.mjs +1 -0
  43. package/dist/ToolProbe-C7ZU2x7M.mjs +1 -0
  44. package/dist/ToolRegistry-C5oB8KP8.mjs +1 -0
  45. package/dist/ToolRouter.policy-CfhJczkt.mjs +4 -0
  46. package/dist/TraceRecorder-BiJWBXHX.mjs +272 -0
  47. package/dist/VersionDetector-CHT36Az0.mjs +9 -0
  48. package/dist/Win32API-eUCF57l_.mjs +1 -0
  49. package/dist/Win32Debug-CYrIQBvr.mjs +1 -0
  50. package/dist/WorkflowEngine-D876meOO.mjs +1 -0
  51. package/dist/analysis-D4swdMvq.mjs +6 -0
  52. package/dist/{antidebug-BRKeyt27.mjs → antidebug-7L3ygj_9.mjs} +8 -259
  53. package/dist/apk-packer-BqXcInnX.mjs +1 -0
  54. package/dist/artifactRetention-BCPQASm7.mjs +1 -0
  55. package/dist/artifacts-CkodUM4j.mjs +1 -0
  56. package/dist/authorization-schema-BOFwSXUN.mjs +1 -0
  57. package/dist/betterSqlite3-Brtq-SIQ.mjs +1 -0
  58. package/dist/binary-instrument-DU7V6TUM.mjs +7 -0
  59. package/dist/binary-secrets-PdMVoyt0.mjs +1 -0
  60. package/dist/bind-helpers-m2U8glkF.mjs +1 -0
  61. package/dist/boringssl-inspector-BBaJwwkU.mjs +2 -0
  62. package/dist/browser-Qqco2rOT.mjs +11 -0
  63. package/dist/capabilities-CyXuKUl1.mjs +1 -0
  64. package/dist/chunk-C_pMuVsO.mjs +1 -0
  65. package/dist/collector-Bpl6qy2L.mjs +1 -0
  66. package/dist/concurrency-DCr8WQ2M.mjs +1 -0
  67. package/dist/constants-BYj8Xek8.mjs +1 -0
  68. package/dist/coordination-CWXW1o8K.mjs +1 -0
  69. package/dist/dart-inspector-7AkPeZ_Q.mjs +0 -0
  70. package/dist/debugger-DyALjYMk.mjs +1 -0
  71. package/dist/definitions-BWxBke3r.mjs +1 -0
  72. package/dist/definitions-BYwATKc-.mjs +1 -0
  73. package/dist/definitions-B_83XfNQ.mjs +1 -0
  74. package/dist/definitions-Bf3H1EwV.mjs +1 -0
  75. package/dist/definitions-BftdXgXI.mjs +1 -0
  76. package/dist/definitions-Bio5XJYy.mjs +1 -0
  77. package/dist/definitions-C3qNgSn1.mjs +1 -0
  78. package/dist/definitions-CB6vmOer.mjs +1 -0
  79. package/dist/definitions-CMZRSy3k.mjs +1 -0
  80. package/dist/definitions-CQd7yCQH.mjs +1 -0
  81. package/dist/definitions-CT8ln6GQ.mjs +1 -0
  82. package/dist/definitions-Cenu6mxo.mjs +1 -0
  83. package/dist/definitions-D4g-MS10.mjs +1 -0
  84. package/dist/definitions-D5wl_8HN.mjs +1 -0
  85. package/dist/definitions-DAQm1Xar.mjs +1 -0
  86. package/dist/definitions-DP1vgxEY.mjs +1 -0
  87. package/dist/definitions-DxFNRQNK2.mjs +1 -0
  88. package/dist/definitions-Ibci7e_L.mjs +1 -0
  89. package/dist/definitions-OeLvmlQy.mjs +1 -0
  90. package/dist/definitions-RZYGD_Ey.mjs +1 -0
  91. package/dist/definitions-Tls8c0A0.mjs +1 -0
  92. package/dist/definitions-bybDvnG0.mjs +26 -0
  93. package/dist/definitions-l7TjdE6V.mjs +1 -0
  94. package/dist/encoding-ycOaz8Vr.mjs +2 -0
  95. package/dist/ensure-browser-core-DxWC-NTp.mjs +1 -0
  96. package/dist/evidence-graph-bridge-CV_UdYqj.mjs +1 -0
  97. package/dist/factory-CKr4fAE1.mjs +1 -0
  98. package/dist/flat-target-session-DvcQX7J5.mjs +1 -0
  99. package/dist/formatAddress-vLA_hOJt.mjs +1 -0
  100. package/dist/graphql-B2TiPEow.mjs +62 -0
  101. package/dist/handlers-0yKLRIfo.mjs +2 -0
  102. package/dist/handlers-8zN_vBIz.mjs +1 -0
  103. package/dist/handlers-B62K4FTc.mjs +1 -0
  104. package/dist/handlers-BpDlVVVU.mjs +1 -0
  105. package/dist/handlers-CMJK7m1c.mjs +31 -0
  106. package/dist/handlers-D2ZOul9p.mjs +54 -0
  107. package/dist/handlers-D5E40ssn.mjs +5 -0
  108. package/dist/handlers-DGbdQAgD.mjs +4 -0
  109. package/dist/handlers-DHO3rjsW.mjs +1 -0
  110. package/dist/handlers-FJ80VzUI.mjs +2 -0
  111. package/dist/handlers-VHWrxbM_.mjs +1 -0
  112. package/dist/handlers-l8QIKqBj.mjs +2 -0
  113. package/dist/handlers-mPFiNPe8.mjs +302 -0
  114. package/dist/{handlers-Dz9PYsCa.mjs → handlers-yo_xYzT8.mjs} +118 -904
  115. package/dist/handlers.impl-D9Hh8Bgl.mjs +1 -0
  116. package/dist/hooks-D4XLfgtV.mjs +600 -0
  117. package/dist/index.mjs +13 -5240
  118. package/dist/jadx-search-B_Yse0Zh.mjs +5 -0
  119. package/dist/logger-sBC6IdRT.mjs +1 -0
  120. package/dist/maintenance-BUpIukhg.mjs +1 -0
  121. package/dist/manifest-0Jpt_AQa.mjs +1 -0
  122. package/dist/manifest-B3fZbSWR.mjs +1 -0
  123. package/dist/manifest-B7NB2rh2.mjs +1 -0
  124. package/dist/manifest-BDi4nbH1.mjs +1 -0
  125. package/dist/manifest-BLDfkE7n.mjs +1 -0
  126. package/dist/manifest-BcXbB4gf.mjs +1 -0
  127. package/dist/manifest-Bdnc_vrc.mjs +1 -0
  128. package/dist/manifest-BuYKgCnp.mjs +1 -0
  129. package/dist/manifest-CBfNnGPV.mjs +1 -0
  130. package/dist/manifest-CPS1Xv69.mjs +1 -0
  131. package/dist/manifest-CQH9FhwI.mjs +1 -0
  132. package/dist/manifest-CRryuZF4.mjs +1 -0
  133. package/dist/manifest-CctIumog.mjs +1 -0
  134. package/dist/manifest-CvTe5ZGV2.mjs +1 -0
  135. package/dist/manifest-D-5GH0DV.mjs +1 -0
  136. package/dist/manifest-D3Ssf3IC.mjs +1 -0
  137. package/dist/manifest-D5ck3NvC.mjs +1 -0
  138. package/dist/manifest-D9jUUJAu.mjs +1 -0
  139. package/dist/manifest-DCx6w2XV.mjs +1 -0
  140. package/dist/manifest-DG19q-Ld.mjs +1 -0
  141. package/dist/manifest-DLMlD0Zc.mjs +1 -0
  142. package/dist/manifest-DYpn8w_h.mjs +1 -0
  143. package/dist/manifest-DYzWI8Xs.mjs +1 -0
  144. package/dist/manifest-D_obs5F4.mjs +1 -0
  145. package/dist/manifest-DujQqEQR.mjs +2 -0
  146. package/dist/manifest-DwL2ik8P.mjs +1 -0
  147. package/dist/manifest-ItF5P8A12.mjs +1 -0
  148. package/dist/manifest-KZphqIyX.mjs +1 -0
  149. package/dist/manifest-LG42zPLY2.mjs +1 -0
  150. package/dist/manifest-LLdI5m4T.mjs +1 -0
  151. package/dist/manifest-QYbQXJn0.mjs +1 -0
  152. package/dist/manifest-RcpX_MyZ.mjs +123 -0
  153. package/dist/manifest-YgVd8Sgz.mjs +1 -0
  154. package/dist/manifest-Zy7Odg5J.mjs +1 -0
  155. package/dist/manifest-ff1H7Pdp.mjs +1 -0
  156. package/dist/manifest-iuhF6pTL2.mjs +1 -0
  157. package/dist/manifest-nXHmtMSp2.mjs +1 -0
  158. package/dist/manifest-xWfu6iLo.mjs +1 -0
  159. package/dist/manifest-yC16OhL2.mjs +1 -0
  160. package/dist/manifest-ztWJoXy4.mjs +1 -0
  161. package/dist/matchesWildcardPattern-BAG6LvX5.mjs +1 -0
  162. package/dist/modules-BPBcSaM-.mjs +333 -0
  163. package/dist/mojo-ipc-BhwsdVUW.mjs +9 -0
  164. package/dist/native/scripts/linux/enum-windows.sh +12 -12
  165. package/dist/native/scripts/macos/enum-windows.applescript +22 -22
  166. package/dist/native-j8l473zn.mjs +961 -0
  167. package/dist/network-T0VRwNPd.mjs +7 -0
  168. package/dist/outputPaths-B4Ic4RZh.mjs +2 -0
  169. package/dist/parse-args-Bw413PlW.mjs +1 -0
  170. package/dist/platform-CzaQtISh.mjs +93 -0
  171. package/dist/playwright-cdp-fallback-DqFdx9-s.mjs +1 -0
  172. package/dist/process-CWhsCWrf.mjs +2 -0
  173. package/dist/proxy-DZFlDsG3.mjs +2 -0
  174. package/dist/registry-DH4sc1dt.mjs +1 -0
  175. package/dist/renderer-pid-9tJnZ_9N.mjs +1 -0
  176. package/dist/response-C7rKQst4.mjs +1 -0
  177. package/dist/search-defaults-lYBVn_3L.mjs +1 -0
  178. package/dist/server/plugin-api.d.mts +19 -36
  179. package/dist/server/plugin-api.mjs +1 -293
  180. package/dist/shared-state-board-BSjXLUV1.mjs +1 -0
  181. package/dist/sourcemap-Dh3Ai_ur.mjs +1 -0
  182. package/dist/ssrf-policy-CsIJGkpd.mjs +1 -0
  183. package/dist/streaming-BcJ0B6ao.mjs +1 -0
  184. package/dist/tool-builder-qif8M9-K.mjs +1 -0
  185. package/dist/transform-DOxzeWPB.mjs +103 -0
  186. package/dist/types-D9EiE5o9.mjs +1 -0
  187. package/dist/types-Fz69RzbZ.mjs +1 -0
  188. package/dist/wasm-CZ_HTfKR.mjs +174 -0
  189. package/dist/webcrack-C1iYG_EX.mjs +46 -0
  190. package/dist/workflow-BdwQmARn.mjs +101 -0
  191. package/package.json +55 -82
  192. package/src/native/scripts/linux/enum-windows.sh +12 -12
  193. package/src/native/scripts/macos/enum-windows.applescript +22 -22
  194. package/dist/AntiCheatDetector-CqGDXmfc.mjs +0 -350
  195. package/dist/CacheAdapters-jJFy20G-.mjs +0 -80
  196. package/dist/CodeInjector-BdjRfNx7.mjs +0 -150
  197. package/dist/ConsoleMonitor-DykL3IAw.mjs +0 -2269
  198. package/dist/DarwinAPI-ETyy0xyo.mjs +0 -363
  199. package/dist/DetailedDataManager-HT49OrvF.mjs +0 -217
  200. package/dist/EventBus-DFKvADm3.mjs +0 -141
  201. package/dist/EvidenceGraphBridge-318Oi0Lf.mjs +0 -153
  202. package/dist/ExtensionManager-BDMsY2Dz.mjs +0 -721
  203. package/dist/FingerprintManager-BN4UQWnX.mjs +0 -96
  204. package/dist/HardwareBreakpoint-Cc2AFq1Y.mjs +0 -239
  205. package/dist/HeapAnalyzer-DruMgsgj.mjs +0 -284
  206. package/dist/InstrumentationSession-DLH0vd-z.mjs +0 -244
  207. package/dist/MemoryController-CMtviNW_.mjs +0 -167
  208. package/dist/MemoryScanSession-ITgb_NMi.mjs +0 -278
  209. package/dist/MemoryScanner-CiL7Z3ey.mjs +0 -428
  210. package/dist/NativeMemoryManager.impl-D9Lkovvn.mjs +0 -485
  211. package/dist/NativeMemoryManager.utils-BBlAixF5.mjs +0 -165
  212. package/dist/PEAnalyzer-DMQ44gen.mjs +0 -385
  213. package/dist/PageController-BPJNqqBN.mjs +0 -431
  214. package/dist/PointerChainEngine-K7wN8Z-w.mjs +0 -325
  215. package/dist/PrerequisiteError-TuyZIs6n.mjs +0 -20
  216. package/dist/ProcessRegistry-zGg12QbE.mjs +0 -74
  217. package/dist/ResponseBuilder-CJXWmWNw.mjs +0 -143
  218. package/dist/ReverseEvidenceGraph-C02-gXOh.mjs +0 -269
  219. package/dist/ScriptManager-ZuWD-0Jg.mjs +0 -3003
  220. package/dist/Speedhack-D-z0umeT.mjs +0 -156
  221. package/dist/StealthVerifier-BWmPgQsv.mjs +0 -135
  222. package/dist/StructureAnalyzer-Cav5AVSL.mjs +0 -429
  223. package/dist/ToolCatalog-5OJdMiF0.mjs +0 -582
  224. package/dist/ToolError-jh9whhMd.mjs +0 -15
  225. package/dist/ToolProbe-DbCFGyrg.mjs +0 -45
  226. package/dist/ToolRegistry-B9krbTtI.mjs +0 -180
  227. package/dist/ToolRouter.policy-BGDAGyeH.mjs +0 -344
  228. package/dist/TraceRecorder-B41Z5XBj.mjs +0 -1286
  229. package/dist/VersionDetector-K3V4vGsw.mjs +0 -104
  230. package/dist/Win32API-C2kjj0ze.mjs +0 -346
  231. package/dist/Win32Debug-CKrGOTpo.mjs +0 -274
  232. package/dist/WorkflowEngine-DJ6M4opp.mjs +0 -569
  233. package/dist/analysis-BHeJW2Nb.mjs +0 -1234
  234. package/dist/artifactRetention-CPXkUJXp.mjs +0 -598
  235. package/dist/artifacts-DkfosXH3.mjs +0 -59
  236. package/dist/authorization-schema-DRqyJMSk.mjs +0 -31
  237. package/dist/betterSqlite3-DLSBZodi.mjs +0 -74
  238. package/dist/binary-instrument--V3MAhJ4.mjs +0 -971
  239. package/dist/bind-helpers-ClV34xdn.mjs +0 -42
  240. package/dist/boringssl-inspector-Bo_LOLaS.mjs +0 -180
  241. package/dist/browser-Dx3_S2cG.mjs +0 -4369
  242. package/dist/capabilities-CcHlvWgK.mjs +0 -33
  243. package/dist/chunk-CjcI7cDX.mjs +0 -15
  244. package/dist/concurrency-Drev_Vz9.mjs +0 -41
  245. package/dist/constants-CDZLOoVv.mjs +0 -534
  246. package/dist/coordination-DgItD9DL.mjs +0 -259
  247. package/dist/debugger-RS3RSAqs.mjs +0 -1288
  248. package/dist/definitions-BEoYofW5.mjs +0 -47
  249. package/dist/definitions-BRaefg3u.mjs +0 -365
  250. package/dist/definitions-BbkvZkiv.mjs +0 -96
  251. package/dist/definitions-BtWSHJ3o.mjs +0 -17
  252. package/dist/definitions-C1gCHO0i.mjs +0 -43
  253. package/dist/definitions-CDOg_b-l.mjs +0 -138
  254. package/dist/definitions-CVPD9hzZ.mjs +0 -54
  255. package/dist/definitions-Cea8Lgl7.mjs +0 -94
  256. package/dist/definitions-DAgIyjxM.mjs +0 -10
  257. package/dist/definitions-DJA27nsL.mjs +0 -66
  258. package/dist/definitions-DKPFU3LW.mjs +0 -25
  259. package/dist/definitions-DPRpZQ96.mjs +0 -47
  260. package/dist/definitions-DUE5gmdn.mjs +0 -18
  261. package/dist/definitions-DYVjOtxa.mjs +0 -26
  262. package/dist/definitions-DcYLVLCo.mjs +0 -37
  263. package/dist/definitions-Pp5LI2H4.mjs +0 -27
  264. package/dist/definitions-j9KdHVNR.mjs +0 -14
  265. package/dist/definitions-uzkjBwa7.mjs +0 -258
  266. package/dist/definitions-va-AnLuQ.mjs +0 -28
  267. package/dist/encoding-DJeqHmpd.mjs +0 -1079
  268. package/dist/evidence-graph-bridge-DcYizFk2.mjs +0 -136
  269. package/dist/factory-C90tBff6.mjs +0 -575
  270. package/dist/flat-target-session-Dgax2Cy3.mjs +0 -29
  271. package/dist/formatAddress-nnMvEohD.mjs +0 -17
  272. package/dist/graphql-CoHrhweh.mjs +0 -1197
  273. package/dist/handlers-4jmR0nMs.mjs +0 -898
  274. package/dist/handlers-BAHPxcch.mjs +0 -789
  275. package/dist/handlers-BOs9b907.mjs +0 -2600
  276. package/dist/handlers-BWXEy6ef.mjs +0 -917
  277. package/dist/handlers-Bndn6QvE.mjs +0 -111
  278. package/dist/handlers-BqC4bD4s.mjs +0 -681
  279. package/dist/handlers-BtYq60bM2.mjs +0 -276
  280. package/dist/handlers-BzgcB4iv.mjs +0 -799
  281. package/dist/handlers-CRyRWj2b.mjs +0 -859
  282. package/dist/handlers-CVv2H1uq.mjs +0 -592
  283. package/dist/handlers-Dl5a7JS4.mjs +0 -572
  284. package/dist/handlers-Dx2d7jt7.mjs +0 -2537
  285. package/dist/handlers-HujRKC3b.mjs +0 -661
  286. package/dist/handlers.impl-XWXkQfyi.mjs +0 -807
  287. package/dist/hooks-B1B8NRHL.mjs +0 -898
  288. package/dist/logger-Dh_xb7_2.mjs +0 -93
  289. package/dist/maintenance-PRMkLVRW.mjs +0 -835
  290. package/dist/manifest-67Bok-Si.mjs +0 -58
  291. package/dist/manifest-6lNTMZAB2.mjs +0 -87
  292. package/dist/manifest-B2duEHiH.mjs +0 -90
  293. package/dist/manifest-B6EY9Vm8.mjs +0 -57
  294. package/dist/manifest-B6nKSbyY.mjs +0 -95
  295. package/dist/manifest-BL8AQNPF.mjs +0 -106
  296. package/dist/manifest-BSZvJJmV.mjs +0 -47
  297. package/dist/manifest-BU7qzUyX.mjs +0 -418
  298. package/dist/manifest-Bl62e8WK.mjs +0 -49
  299. package/dist/manifest-Bo5cXjdt.mjs +0 -82
  300. package/dist/manifest-BpS4gtUK.mjs +0 -1347
  301. package/dist/manifest-Bv65_e2W.mjs +0 -101
  302. package/dist/manifest-BytNIF4Z.mjs +0 -117
  303. package/dist/manifest-C-xtsjS3.mjs +0 -81
  304. package/dist/manifest-CDYl7OhA.mjs +0 -66
  305. package/dist/manifest-CRZ3xmkD.mjs +0 -61
  306. package/dist/manifest-CoW6u4Tp.mjs +0 -132
  307. package/dist/manifest-Cq5zN_8A.mjs +0 -50
  308. package/dist/manifest-D7YZM_2e.mjs +0 -194
  309. package/dist/manifest-DE_VrAeQ.mjs +0 -314
  310. package/dist/manifest-DGsXSCpT.mjs +0 -39
  311. package/dist/manifest-DJ2vfEuW.mjs +0 -156
  312. package/dist/manifest-DPXDYhEu.mjs +0 -80
  313. package/dist/manifest-Dd4fQb0a.mjs +0 -322
  314. package/dist/manifest-Deq6opGg.mjs +0 -223
  315. package/dist/manifest-DfJTafJK.mjs +0 -37
  316. package/dist/manifest-DgOdgN_j.mjs +0 -50
  317. package/dist/manifest-DlbMW4v4.mjs +0 -47
  318. package/dist/manifest-DmVfbH0w.mjs +0 -374
  319. package/dist/manifest-Dog6Ddjr.mjs +0 -109
  320. package/dist/manifest-DvgU5FWb.mjs +0 -58
  321. package/dist/manifest-HsfDBs7j.mjs +0 -50
  322. package/dist/manifest-I8oQHvCG.mjs +0 -186
  323. package/dist/manifest-NvH_a-av.mjs +0 -786
  324. package/dist/manifest-cEJU1v0Z.mjs +0 -129
  325. package/dist/manifest-wOl5XLB12.mjs +0 -112
  326. package/dist/modules-tZozf0LQ.mjs +0 -10635
  327. package/dist/mojo-ipc-DXNEXEqb.mjs +0 -640
  328. package/dist/network-CPVvwvFg.mjs +0 -3852
  329. package/dist/outputPaths-um7lCRY3.mjs +0 -1141
  330. package/dist/parse-args-B4cY5Vx5.mjs +0 -39
  331. package/dist/platform-CYeFoTWp.mjs +0 -2161
  332. package/dist/process-BTbgcVc6.mjs +0 -1306
  333. package/dist/proxy-r8YN6nP1.mjs +0 -192
  334. package/dist/registry-Bl8ZQW61.mjs +0 -34
  335. package/dist/response-CWhh2aLo.mjs +0 -34
  336. package/dist/shared-state-board-BoZnSoj-.mjs +0 -586
  337. package/dist/sourcemap-BIDHUVXy.mjs +0 -934
  338. package/dist/ssrf-policy-Dsqd-DTX.mjs +0 -166
  339. package/dist/streaming-Dal6utPp.mjs +0 -725
  340. package/dist/tool-builder-BHJp32mV.mjs +0 -186
  341. package/dist/transform-DRVgGG90.mjs +0 -1011
  342. package/dist/types-Bx92KJfT.mjs +0 -4
  343. package/dist/types-DDBWs9UP.mjs +0 -37
  344. package/dist/wasm-BYx5UOeG.mjs +0 -1044
  345. package/dist/webcrack-Be0_FccV.mjs +0 -747
  346. package/dist/workflow-BpuKEtvn.mjs +0 -725
@@ -1,807 +0,0 @@
1
- import { Rt as MEMORY_SCAN_MAX_RESULTS } from "./constants-CDZLOoVv.mjs";
2
- //#region src/server/domains/memory/handlers/session.ts
3
- function toTextResponse$6(payload) {
4
- return { content: [{
5
- type: "text",
6
- text: JSON.stringify(payload, null, 2)
7
- }] };
8
- }
9
- function toErrorResponse$6(tool, error) {
10
- return toTextResponse$6({
11
- success: false,
12
- tool,
13
- error: error instanceof Error ? error.message : String(error)
14
- });
15
- }
16
- var SessionHandlers = class {
17
- constructor(sessionManager) {
18
- this.sessionManager = sessionManager;
19
- }
20
- async handleScanList(_args) {
21
- try {
22
- const sessions = this.sessionManager.listSessions();
23
- return toTextResponse$6({
24
- success: true,
25
- sessions,
26
- count: sessions.length
27
- });
28
- } catch (error) {
29
- return toErrorResponse$6("memory_scan_session", error);
30
- }
31
- }
32
- async handleScanDelete(args) {
33
- try {
34
- return toTextResponse$6({
35
- success: true,
36
- deleted: this.sessionManager.deleteSession(args.sessionId)
37
- });
38
- } catch (error) {
39
- return toErrorResponse$6("memory_scan_session", error);
40
- }
41
- }
42
- async handleScanExport(args) {
43
- try {
44
- return toTextResponse$6({
45
- success: true,
46
- exportedData: this.sessionManager.exportSession(args.sessionId)
47
- });
48
- } catch (error) {
49
- return toErrorResponse$6("memory_scan_session", error);
50
- }
51
- }
52
- };
53
- //#endregion
54
- //#region src/server/domains/memory/handlers/scan.ts
55
- /** SECURITY: Cap user-supplied maxResults to prevent OOM */
56
- function capMaxResults(value) {
57
- if (value === void 0 || !Number.isFinite(value) || value <= 0) return MEMORY_SCAN_MAX_RESULTS;
58
- return Math.min(value, MEMORY_SCAN_MAX_RESULTS);
59
- }
60
- function toTextResponse$5(payload) {
61
- return { content: [{
62
- type: "text",
63
- text: JSON.stringify(payload, null, 2)
64
- }] };
65
- }
66
- function toErrorResponse$5(tool, error) {
67
- return toTextResponse$5({
68
- success: false,
69
- tool,
70
- error: error instanceof Error ? error.message : String(error)
71
- });
72
- }
73
- var ScanHandlers = class {
74
- constructor(scanner, eventBus) {
75
- this.scanner = scanner;
76
- this.eventBus = eventBus;
77
- }
78
- async handleFirstScan(args) {
79
- try {
80
- const options = {
81
- valueType: args.valueType,
82
- alignment: args.alignment,
83
- maxResults: capMaxResults(args.maxResults),
84
- regionFilter: args.regionFilter,
85
- onProgress: args.onProgress
86
- };
87
- const result = await this.scanner.firstScan(args.pid, args.value, options);
88
- this.eventBus?.emit("memory:scan_completed", {
89
- scanType: "first",
90
- resultCount: result.totalMatches ?? 0,
91
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
92
- });
93
- return toTextResponse$5({
94
- success: true,
95
- ...result,
96
- hint: result.totalMatches > 0 ? `Found ${result.totalMatches} matches. Use memory_next_scan with sessionId "${result.sessionId}" to narrow down.` : "No matches found. Try a different value or type."
97
- });
98
- } catch (error) {
99
- return toErrorResponse$5("memory_first_scan", error);
100
- }
101
- }
102
- async handleNextScan(args) {
103
- try {
104
- const result = await this.scanner.nextScan(args.sessionId, args.mode, args.value, args.value2);
105
- return toTextResponse$5({
106
- success: true,
107
- ...result,
108
- hint: result.totalMatches <= 10 ? "Few matches remaining — inspect these addresses." : `${result.totalMatches} matches remain. Continue narrowing with memory_next_scan.`
109
- });
110
- } catch (error) {
111
- return toErrorResponse$5("memory_next_scan", error);
112
- }
113
- }
114
- async handleUnknownScan(args) {
115
- try {
116
- const options = {
117
- valueType: args.valueType,
118
- alignment: args.alignment,
119
- maxResults: capMaxResults(args.maxResults),
120
- regionFilter: args.regionFilter,
121
- onProgress: args.onProgress
122
- };
123
- const result = await this.scanner.unknownInitialScan(args.pid, options);
124
- return toTextResponse$5({
125
- success: true,
126
- ...result,
127
- hint: `Captured ${result.totalMatches} addresses. Use memory_next_scan with changed/unchanged/increased/decreased to narrow.`
128
- });
129
- } catch (error) {
130
- return toErrorResponse$5("memory_unknown_scan", error);
131
- }
132
- }
133
- async handlePointerScan(args) {
134
- try {
135
- return toTextResponse$5({
136
- success: true,
137
- ...await this.scanner.pointerScan(args.pid, args.targetAddress, {
138
- maxResults: capMaxResults(args.maxResults),
139
- moduleOnly: args.moduleOnly
140
- })
141
- });
142
- } catch (error) {
143
- return toErrorResponse$5("memory_pointer_scan", error);
144
- }
145
- }
146
- async handleGroupScan(args) {
147
- try {
148
- return toTextResponse$5({
149
- success: true,
150
- ...await this.scanner.groupScan(args.pid, args.pattern, {
151
- alignment: args.alignment,
152
- maxResults: capMaxResults(args.maxResults)
153
- })
154
- });
155
- } catch (error) {
156
- return toErrorResponse$5("memory_group_scan", error);
157
- }
158
- }
159
- };
160
- //#endregion
161
- //#region src/server/domains/memory/handlers/pointer-chain.ts
162
- function toTextResponse$4(payload) {
163
- return { content: [{
164
- type: "text",
165
- text: JSON.stringify(payload, null, 2)
166
- }] };
167
- }
168
- function toErrorResponse$4(tool, error) {
169
- return toTextResponse$4({
170
- success: false,
171
- tool,
172
- error: error instanceof Error ? error.message : String(error)
173
- });
174
- }
175
- var PointerChainHandlers = class {
176
- constructor(ptrEngine) {
177
- this.ptrEngine = ptrEngine;
178
- }
179
- async handlePointerChainScan(args) {
180
- try {
181
- const result = await this.ptrEngine.scan(args.pid, args.targetAddress, {
182
- maxDepth: args.maxDepth,
183
- maxOffset: args.maxOffset,
184
- staticOnly: args.staticOnly,
185
- modules: args.modules,
186
- maxResults: args.maxResults
187
- });
188
- return toTextResponse$4({
189
- success: true,
190
- ...result,
191
- hint: result.totalFound > 0 ? `Found ${result.totalFound} pointer chains. Static chains survive process restarts.` : "No pointer chains found. Try increasing maxDepth or maxOffset."
192
- });
193
- } catch (error) {
194
- return toErrorResponse$4("memory_pointer_chain_scan", error);
195
- }
196
- }
197
- async handlePointerChainValidate(args) {
198
- try {
199
- const chains = JSON.parse(args.chains);
200
- const results = await this.ptrEngine.validateChains(args.pid, chains);
201
- return toTextResponse$4({
202
- success: true,
203
- results,
204
- validCount: results.filter((r) => r.isValid).length,
205
- totalChecked: chains.length
206
- });
207
- } catch (error) {
208
- return toErrorResponse$4("memory_pointer_chain_validate", error);
209
- }
210
- }
211
- async handlePointerChainResolve(args) {
212
- try {
213
- const chain = JSON.parse(args.chain);
214
- const resolved = await this.ptrEngine.resolveChain(args.pid, chain);
215
- return toTextResponse$4({
216
- success: true,
217
- chainId: chain.id,
218
- resolvedAddress: resolved,
219
- isResolvable: resolved !== null
220
- });
221
- } catch (error) {
222
- return toErrorResponse$4("memory_pointer_chain_resolve", error);
223
- }
224
- }
225
- async handlePointerChainExport(args) {
226
- try {
227
- const chains = JSON.parse(args.chains);
228
- return toTextResponse$4({
229
- success: true,
230
- exportedData: this.ptrEngine.exportChains(chains),
231
- chainCount: chains.length
232
- });
233
- } catch (error) {
234
- return toErrorResponse$4("memory_pointer_chain_export", error);
235
- }
236
- }
237
- };
238
- //#endregion
239
- //#region src/server/domains/memory/handlers/structure.ts
240
- function toTextResponse$3(payload) {
241
- return { content: [{
242
- type: "text",
243
- text: JSON.stringify(payload, null, 2)
244
- }] };
245
- }
246
- function toErrorResponse$3(tool, error) {
247
- return toTextResponse$3({
248
- success: false,
249
- tool,
250
- error: error instanceof Error ? error.message : String(error)
251
- });
252
- }
253
- const FIELD_TYPE_ALIASES = {
254
- int8_t: "int8",
255
- uint8_t: "uint8",
256
- int16_t: "int16",
257
- uint16_t: "uint16",
258
- int32_t: "int32",
259
- uint32_t: "uint32",
260
- int64_t: "int64",
261
- uint64_t: "uint64",
262
- void_ptr: "pointer",
263
- char_ptr: "string_ptr"
264
- };
265
- function normalizeFieldType(value) {
266
- if (typeof value !== "string" || value.length === 0) return "unknown";
267
- const normalized = value.toLowerCase().replace(/\s+/g, "_").replace(/\*/g, "_ptr");
268
- return FIELD_TYPE_ALIASES[normalized] ?? normalized;
269
- }
270
- function normalizeStructureForExport(raw) {
271
- if (!raw || typeof raw !== "object") throw new Error("structure must be a JSON object");
272
- const source = raw;
273
- const fields = (Array.isArray(source.fields) ? source.fields : []).map((entry, index) => {
274
- const field = entry;
275
- return {
276
- offset: typeof field.offset === "number" ? field.offset : 0,
277
- size: typeof field.size === "number" ? field.size : 1,
278
- type: normalizeFieldType(field.type),
279
- name: typeof field.name === "string" && field.name.length > 0 ? field.name : `field_${index}`,
280
- value: typeof field.value === "string" ? field.value : "",
281
- confidence: typeof field.confidence === "number" ? field.confidence : 1,
282
- notes: typeof field.notes === "string" ? field.notes : void 0
283
- };
284
- });
285
- const inferredSize = fields.reduce((max, field) => Math.max(max, field.offset + field.size), 0);
286
- const totalSize = typeof source.totalSize === "number" ? source.totalSize : typeof source.size === "number" ? source.size : inferredSize;
287
- return {
288
- baseAddress: typeof source.baseAddress === "string" ? source.baseAddress : "0x0",
289
- totalSize,
290
- fields,
291
- vtableAddress: typeof source.vtableAddress === "string" ? source.vtableAddress : void 0,
292
- className: typeof source.className === "string" ? source.className : void 0,
293
- baseClasses: Array.isArray(source.baseClasses) ? source.baseClasses.filter((entry) => typeof entry === "string") : void 0,
294
- timestamp: typeof source.timestamp === "number" ? source.timestamp : Date.now()
295
- };
296
- }
297
- var StructureHandlers = class {
298
- constructor(structAnalyzer) {
299
- this.structAnalyzer = structAnalyzer;
300
- }
301
- async handleStructureAnalyze(args) {
302
- try {
303
- const result = await this.structAnalyzer.analyzeStructure(args.pid, args.address, {
304
- size: args.size,
305
- otherInstances: args.otherInstances,
306
- parseRtti: args.parseRtti
307
- });
308
- return toTextResponse$3({
309
- success: true,
310
- ...result,
311
- hint: result.className ? `Detected class: ${result.className}${result.baseClasses?.length ? ` (inherits: ${result.baseClasses.join(" → ")})` : ""}` : `Inferred ${result.fields.length} fields. Use memory_structure_export_c to export as C struct.`
312
- });
313
- } catch (error) {
314
- return toErrorResponse$3("memory_structure_analyze", error);
315
- }
316
- }
317
- async handleVtableParse(args) {
318
- try {
319
- return toTextResponse$3({
320
- success: true,
321
- ...await this.structAnalyzer.parseVtable(args.pid, args.vtableAddress)
322
- });
323
- } catch (error) {
324
- return toErrorResponse$3("memory_vtable_parse", error);
325
- }
326
- }
327
- async handleStructureExportC(args) {
328
- try {
329
- const structure = normalizeStructureForExport(JSON.parse(args.structure));
330
- return toTextResponse$3({
331
- success: true,
332
- ...this.structAnalyzer.exportToCStruct(structure, args.name)
333
- });
334
- } catch (error) {
335
- return toErrorResponse$3("memory_structure_export_c", error);
336
- }
337
- }
338
- async handleStructureCompare(args) {
339
- try {
340
- const result = await this.structAnalyzer.compareInstances(args.pid, args.address1, args.address2, args.size);
341
- return toTextResponse$3({
342
- success: true,
343
- matchingFieldCount: result.matching.length,
344
- differingFieldCount: result.differing.length,
345
- ...result
346
- });
347
- } catch (error) {
348
- return toErrorResponse$3("memory_structure_compare", error);
349
- }
350
- }
351
- };
352
- //#endregion
353
- //#region src/server/domains/memory/handlers/hooks.ts
354
- function toTextResponse$2(payload) {
355
- return { content: [{
356
- type: "text",
357
- text: JSON.stringify(payload, null, 2)
358
- }] };
359
- }
360
- function toErrorResponse$2(tool, error) {
361
- return toTextResponse$2({
362
- success: false,
363
- tool,
364
- error: error instanceof Error ? error.message : String(error)
365
- });
366
- }
367
- var HookHandlers = class {
368
- constructor(bpEngine, injector) {
369
- this.bpEngine = bpEngine;
370
- this.injector = injector;
371
- }
372
- async handleBreakpointSet(args) {
373
- try {
374
- return toTextResponse$2({
375
- success: true,
376
- ...await this.bpEngine.setBreakpoint(args.pid, args.address, args.access, args.size ?? 4),
377
- hint: "Hardware breakpoint set on DR register. Use memory_breakpoint with action='trace' to collect hits."
378
- });
379
- } catch (error) {
380
- return toErrorResponse$2("memory_breakpoint", error);
381
- }
382
- }
383
- async handleBreakpointRemove(args) {
384
- try {
385
- return toTextResponse$2({
386
- success: true,
387
- removed: await this.bpEngine.removeBreakpoint(args.breakpointId)
388
- });
389
- } catch (error) {
390
- return toErrorResponse$2("memory_breakpoint", error);
391
- }
392
- }
393
- async handleBreakpointList(_args) {
394
- try {
395
- const bps = this.bpEngine.listBreakpoints();
396
- return toTextResponse$2({
397
- success: true,
398
- breakpoints: bps,
399
- count: bps.length
400
- });
401
- } catch (error) {
402
- return toErrorResponse$2("memory_breakpoint", error);
403
- }
404
- }
405
- async handleBreakpointTrace(args) {
406
- try {
407
- const hits = await this.bpEngine.traceAccess(args.pid, args.address, args.access, args.maxHits, args.timeoutMs);
408
- return toTextResponse$2({
409
- success: true,
410
- hits,
411
- hitCount: hits.length,
412
- hint: hits.length > 0 ? `${hits.length} accesses captured. Check instructionAddress to find the code accessing this address.` : "No hits captured within timeout."
413
- });
414
- } catch (error) {
415
- return toErrorResponse$2("memory_breakpoint", error);
416
- }
417
- }
418
- async handlePatchBytes(args) {
419
- try {
420
- const patch = await this.injector.patchBytes(args.pid, args.address, args.bytes);
421
- return toTextResponse$2({
422
- success: true,
423
- ...patch,
424
- hint: `Patch applied. Use memory_patch_undo with patchId "${patch.id}" to restore.`
425
- });
426
- } catch (error) {
427
- return toErrorResponse$2("memory_patch_bytes", error);
428
- }
429
- }
430
- async handlePatchNop(args) {
431
- try {
432
- return toTextResponse$2({
433
- success: true,
434
- ...await this.injector.nopBytes(args.pid, args.address, args.count),
435
- hint: `${args.count} bytes NOP'd. Use memory_patch_undo to restore.`
436
- });
437
- } catch (error) {
438
- return toErrorResponse$2("memory_patch_nop", error);
439
- }
440
- }
441
- async handlePatchUndo(args) {
442
- try {
443
- return toTextResponse$2({
444
- success: true,
445
- restored: await this.injector.unpatch(args.patchId)
446
- });
447
- } catch (error) {
448
- return toErrorResponse$2("memory_patch_undo", error);
449
- }
450
- }
451
- async handleCodeCaves(args) {
452
- try {
453
- const caves = await this.injector.findCodeCaves(args.pid, args.minSize);
454
- return toTextResponse$2({
455
- success: true,
456
- caves,
457
- count: caves.length
458
- });
459
- } catch (error) {
460
- return toErrorResponse$2("memory_code_caves", error);
461
- }
462
- }
463
- };
464
- //#endregion
465
- //#region src/server/domains/memory/handlers/readwrite.ts
466
- function toTextResponse$1(payload) {
467
- return { content: [{
468
- type: "text",
469
- text: JSON.stringify(payload, null, 2)
470
- }] };
471
- }
472
- function toErrorResponse$1(tool, error) {
473
- return toTextResponse$1({
474
- success: false,
475
- tool,
476
- error: error instanceof Error ? error.message : String(error)
477
- });
478
- }
479
- var ReadWriteHandlers = class {
480
- constructor(memCtrl) {
481
- this.memCtrl = memCtrl;
482
- }
483
- async handleWriteValue(args) {
484
- try {
485
- return toTextResponse$1({
486
- success: true,
487
- ...await this.memCtrl.writeValue(args.pid, args.address, args.value, args.valueType),
488
- hint: "Use memory_write_history with action='undo' to revert."
489
- });
490
- } catch (error) {
491
- return toErrorResponse$1("memory_write_value", error);
492
- }
493
- }
494
- async handleFreeze(args) {
495
- try {
496
- const entry = await this.memCtrl.freeze(args.pid, args.address, args.value, args.valueType, args.intervalMs);
497
- return toTextResponse$1({
498
- success: true,
499
- ...entry,
500
- hint: `Frozen. Use memory_freeze with action="unfreeze" and freezeId "${entry.id}" to stop.`
501
- });
502
- } catch (error) {
503
- return toErrorResponse$1("memory_freeze", error);
504
- }
505
- }
506
- async handleUnfreeze(args) {
507
- try {
508
- return toTextResponse$1({
509
- success: true,
510
- unfrozen: await this.memCtrl.unfreeze(args.freezeId)
511
- });
512
- } catch (error) {
513
- return toErrorResponse$1("memory_freeze", error);
514
- }
515
- }
516
- async handleDump(args) {
517
- try {
518
- return toTextResponse$1({
519
- success: true,
520
- dump: await this.memCtrl.dumpMemoryHex(args.pid, args.address, args.size ?? 256)
521
- });
522
- } catch (error) {
523
- return toErrorResponse$1("memory_dump", error);
524
- }
525
- }
526
- async handleWriteUndo(_args) {
527
- try {
528
- const entry = await this.memCtrl.undo();
529
- return toTextResponse$1({
530
- success: true,
531
- undone: entry !== null,
532
- entry
533
- });
534
- } catch (error) {
535
- return toErrorResponse$1("memory_write_history", error);
536
- }
537
- }
538
- async handleWriteRedo(_args) {
539
- try {
540
- const entry = await this.memCtrl.redo();
541
- return toTextResponse$1({
542
- success: true,
543
- redone: entry !== null,
544
- entry
545
- });
546
- } catch (error) {
547
- return toErrorResponse$1("memory_write_history", error);
548
- }
549
- }
550
- };
551
- //#endregion
552
- //#region src/server/domains/memory/handlers/integrity.ts
553
- function toTextResponse(payload) {
554
- return { content: [{
555
- type: "text",
556
- text: JSON.stringify(payload, null, 2)
557
- }] };
558
- }
559
- function toErrorResponse(tool, error) {
560
- return toTextResponse({
561
- success: false,
562
- tool,
563
- error: error instanceof Error ? error.message : String(error)
564
- });
565
- }
566
- var IntegrityHandlers = class {
567
- constructor(speedhackEngine, heapAnalyzer, peAnalyzer, antiCheatDetector) {
568
- this.speedhackEngine = speedhackEngine;
569
- this.heapAnalyzer = heapAnalyzer;
570
- this.peAnalyzer = peAnalyzer;
571
- this.antiCheatDetector = antiCheatDetector;
572
- }
573
- async handleSpeedhackApply(args) {
574
- try {
575
- return toTextResponse({
576
- ...await this.speedhackEngine.apply(args.pid, args.speed),
577
- success: true,
578
- hint: `Speedhack active (${args.speed}x). Use memory_speedhack({ action: 'set' }) to adjust.`
579
- });
580
- } catch (error) {
581
- return toErrorResponse("memory_speedhack", error);
582
- }
583
- }
584
- async handleSpeedhackSet(args) {
585
- try {
586
- return toTextResponse({
587
- success: true,
588
- updated: await this.speedhackEngine.setSpeed(args.pid, args.speed),
589
- newSpeed: args.speed
590
- });
591
- } catch (error) {
592
- return toErrorResponse("memory_speedhack", error);
593
- }
594
- }
595
- async handleHeapEnumerate(args) {
596
- try {
597
- const result = await this.heapAnalyzer.enumerateHeaps(args.pid);
598
- return toTextResponse({
599
- success: true,
600
- ...result,
601
- hint: `Enumerated ${result.heaps.length} heaps. Use memory_heap_stats for statistics or memory_heap_anomalies to check for issues.`
602
- });
603
- } catch (error) {
604
- return toErrorResponse("memory_heap_enumerate", error);
605
- }
606
- }
607
- async handleHeapStats(args) {
608
- try {
609
- return toTextResponse({
610
- success: true,
611
- ...await this.heapAnalyzer.getStats(args.pid)
612
- });
613
- } catch (error) {
614
- return toErrorResponse("memory_heap_stats", error);
615
- }
616
- }
617
- async handleHeapAnomalies(args) {
618
- try {
619
- const anomalies = await this.heapAnalyzer.detectAnomalies(args.pid);
620
- return toTextResponse({
621
- success: true,
622
- anomalies,
623
- count: anomalies.length,
624
- hint: anomalies.length > 0 ? `Found ${anomalies.length} anomalies — inspect types for spray, UAF, or suspicious patterns.` : "No heap anomalies detected."
625
- });
626
- } catch (error) {
627
- return toErrorResponse("memory_heap_anomalies", error);
628
- }
629
- }
630
- async handlePEHeaders(args) {
631
- try {
632
- return toTextResponse({
633
- success: true,
634
- ...await this.peAnalyzer.parseHeaders(args.pid, args.moduleBase)
635
- });
636
- } catch (error) {
637
- return toErrorResponse("memory_pe_headers", error);
638
- }
639
- }
640
- async handlePEImportsExports(args) {
641
- try {
642
- const table = args.table || "both";
643
- const base = args.moduleBase;
644
- const pid = args.pid;
645
- const result = { success: true };
646
- if (table === "imports" || table === "both") result.imports = await this.peAnalyzer.parseImports(pid, base);
647
- if (table === "exports" || table === "both") result.exports = await this.peAnalyzer.parseExports(pid, base);
648
- return toTextResponse(result);
649
- } catch (error) {
650
- return toErrorResponse("memory_pe_imports_exports", error);
651
- }
652
- }
653
- async handleInlineHookDetect(args) {
654
- try {
655
- const hooks = await this.peAnalyzer.detectInlineHooks(args.pid, args.moduleName);
656
- return toTextResponse({
657
- success: true,
658
- hooks,
659
- count: hooks.length,
660
- hint: hooks.length > 0 ? `Detected ${hooks.length} inline hooks — check hookType and jumpTarget for each.` : "No inline hooks detected — exports match disk bytes."
661
- });
662
- } catch (error) {
663
- return toErrorResponse("memory_inline_hook_detect", error);
664
- }
665
- }
666
- async handleAntiCheatDetect(args) {
667
- try {
668
- const detections = await this.antiCheatDetector.detect(args.pid);
669
- return toTextResponse({
670
- success: true,
671
- detections,
672
- count: detections.length,
673
- hint: detections.length > 0 ? `Found ${detections.length} anti-debug mechanisms. Each includes a bypassSuggestion.` : "No anti-debug mechanisms detected in imports."
674
- });
675
- } catch (error) {
676
- return toErrorResponse("memory_anticheat_detect", error);
677
- }
678
- }
679
- async handleGuardPages(args) {
680
- try {
681
- const { guardPages, stats } = await this.antiCheatDetector.scanGuardPages(args.pid);
682
- return toTextResponse({
683
- success: true,
684
- guardPages,
685
- count: guardPages.length,
686
- scan: stats,
687
- hint: stats.truncated ? `Scan stopped after ${stats.scannedRegions} regions in ${stats.durationMs}ms to avoid hanging. Results may be partial.` : guardPages.length > 0 ? `Found ${guardPages.length} guard page regions — these may indicate anti-tampering.` : "No guard pages found."
688
- });
689
- } catch (error) {
690
- return toErrorResponse("memory_guard_pages", error);
691
- }
692
- }
693
- async handleIntegrityCheck(args) {
694
- try {
695
- const { sections, stats } = await this.antiCheatDetector.scanIntegrity(args.pid, args.moduleName);
696
- const modified = sections.filter((r) => r.isModified);
697
- return toTextResponse({
698
- success: true,
699
- sections,
700
- totalChecked: sections.length,
701
- modifiedCount: modified.length,
702
- scan: stats,
703
- hint: stats.truncated ? `Checked ${stats.scannedSections} executable section(s) across ${stats.scannedModules} module(s) before hitting safety limits. Results may be partial.` : modified.length > 0 ? `${modified.length} section(s) modified — code may have been patched or hooked.` : "All checked sections match disk — no runtime modifications detected."
704
- });
705
- } catch (error) {
706
- return toErrorResponse("memory_integrity_check", error);
707
- }
708
- }
709
- };
710
- //#endregion
711
- //#region src/server/domains/memory/handlers.impl.ts
712
- var MemoryScanHandlers = class {
713
- sessions;
714
- scans;
715
- ptrChains;
716
- structures;
717
- hooks;
718
- readwrite;
719
- integrity;
720
- constructor(scanner, sessionManager, ptrEngine, structAnalyzer, bpEngine, injector, memCtrl, speedhackEngine, heapAnalyzer, peAnalyzer, antiCheatDetector, eventBus) {
721
- this.sessions = new SessionHandlers(sessionManager);
722
- this.scans = new ScanHandlers(scanner, eventBus);
723
- this.ptrChains = new PointerChainHandlers(ptrEngine);
724
- this.structures = new StructureHandlers(structAnalyzer);
725
- this.hooks = new HookHandlers(bpEngine, injector);
726
- this.readwrite = new ReadWriteHandlers(memCtrl);
727
- this.integrity = new IntegrityHandlers(speedhackEngine, heapAnalyzer, peAnalyzer, antiCheatDetector);
728
- }
729
- handleScanSessionDispatch(args) {
730
- switch (String(args["action"] ?? "")) {
731
- case "delete": return this.sessions.handleScanDelete(args);
732
- case "export": return this.sessions.handleScanExport(args);
733
- default: return this.sessions.handleScanList(args);
734
- }
735
- }
736
- handleScanList = (args) => this.sessions.handleScanList(args);
737
- handleScanDelete = (args) => this.sessions.handleScanDelete(args);
738
- handleScanExport = (args) => this.sessions.handleScanExport(args);
739
- handleFirstScan = (args) => this.scans.handleFirstScan(args);
740
- handleNextScan = (args) => this.scans.handleNextScan(args);
741
- handleUnknownScan = (args) => this.scans.handleUnknownScan(args);
742
- handlePointerScan = (args) => this.scans.handlePointerScan(args);
743
- handleGroupScan = (args) => this.scans.handleGroupScan(args);
744
- handlePointerChainDispatch(args) {
745
- switch (String(args["action"] ?? "")) {
746
- case "validate": return this.ptrChains.handlePointerChainValidate(args);
747
- case "resolve": return this.ptrChains.handlePointerChainResolve(args);
748
- case "export": return this.ptrChains.handlePointerChainExport(args);
749
- default: return this.ptrChains.handlePointerChainScan(args);
750
- }
751
- }
752
- handlePointerChainScan = (args) => this.ptrChains.handlePointerChainScan(args);
753
- handlePointerChainValidate = (args) => this.ptrChains.handlePointerChainValidate(args);
754
- handlePointerChainResolve = (args) => this.ptrChains.handlePointerChainResolve(args);
755
- handlePointerChainExport = (args) => this.ptrChains.handlePointerChainExport(args);
756
- handleStructureAnalyze = (args) => this.structures.handleStructureAnalyze(args);
757
- handleVtableParse = (args) => this.structures.handleVtableParse(args);
758
- handleStructureExportC = (args) => this.structures.handleStructureExportC(args);
759
- handleStructureCompare = (args) => this.structures.handleStructureCompare(args);
760
- handleBreakpointDispatch(args) {
761
- switch (String(args["action"] ?? "")) {
762
- case "remove": return this.hooks.handleBreakpointRemove(args);
763
- case "list": return this.hooks.handleBreakpointList(args);
764
- case "trace": return this.hooks.handleBreakpointTrace(args);
765
- default: return this.hooks.handleBreakpointSet(args);
766
- }
767
- }
768
- handleBreakpointSet = (args) => this.hooks.handleBreakpointSet(args);
769
- handleBreakpointRemove = (args) => this.hooks.handleBreakpointRemove(args);
770
- handleBreakpointList = (args) => this.hooks.handleBreakpointList(args);
771
- handleBreakpointTrace = (args) => this.hooks.handleBreakpointTrace(args);
772
- handlePatchBytes = (args) => this.hooks.handlePatchBytes(args);
773
- handlePatchNop = (args) => this.hooks.handlePatchNop(args);
774
- handlePatchUndo = (args) => this.hooks.handlePatchUndo(args);
775
- handleCodeCaves = (args) => this.hooks.handleCodeCaves(args);
776
- handleFreezeDispatch(args) {
777
- if (String(args["action"] ?? "") === "unfreeze") return this.readwrite.handleUnfreeze(args);
778
- return this.readwrite.handleFreeze(args);
779
- }
780
- handleWriteHistoryDispatch(args) {
781
- if (String(args["action"] ?? "") === "redo") return this.readwrite.handleWriteRedo(args);
782
- return this.readwrite.handleWriteUndo(args);
783
- }
784
- handleWriteValue = (args) => this.readwrite.handleWriteValue(args);
785
- handleFreeze = (args) => this.readwrite.handleFreeze(args);
786
- handleUnfreeze = (args) => this.readwrite.handleUnfreeze(args);
787
- handleDump = (args) => this.readwrite.handleDump(args);
788
- handleWriteUndo = (args) => this.readwrite.handleWriteUndo(args);
789
- handleWriteRedo = (args) => this.readwrite.handleWriteRedo(args);
790
- handleSpeedhackDispatch(args) {
791
- if (String(args["action"] ?? "") === "set") return this.integrity.handleSpeedhackSet(args);
792
- return this.integrity.handleSpeedhackApply(args);
793
- }
794
- handleSpeedhackApply = (args) => this.integrity.handleSpeedhackApply(args);
795
- handleSpeedhackSet = (args) => this.integrity.handleSpeedhackSet(args);
796
- handleHeapEnumerate = (args) => this.integrity.handleHeapEnumerate(args);
797
- handleHeapStats = (args) => this.integrity.handleHeapStats(args);
798
- handleHeapAnomalies = (args) => this.integrity.handleHeapAnomalies(args);
799
- handlePEHeaders = (args) => this.integrity.handlePEHeaders(args);
800
- handlePEImportsExports = (args) => this.integrity.handlePEImportsExports(args);
801
- handleInlineHookDetect = (args) => this.integrity.handleInlineHookDetect(args);
802
- handleAntiCheatDetect = (args) => this.integrity.handleAntiCheatDetect(args);
803
- handleGuardPages = (args) => this.integrity.handleGuardPages(args);
804
- handleIntegrityCheck = (args) => this.integrity.handleIntegrityCheck(args);
805
- };
806
- //#endregion
807
- export { MemoryScanHandlers };