@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.
Files changed (187) hide show
  1. package/README.md +2 -2
  2. package/README.zh.md +2 -2
  3. package/dist/{AntiCheatDetector-BNk-EoBt.mjs → AntiCheatDetector-CqGDXmfc.mjs} +159 -53
  4. package/dist/{CodeInjector-Cq8q01kp.mjs → CodeInjector-BdjRfNx7.mjs} +5 -5
  5. package/dist/{ConsoleMonitor-CPVQW1Y-.mjs → ConsoleMonitor-DykL3IAw.mjs} +85 -17
  6. package/dist/{DetailedDataManager-BQQcxh64.mjs → DetailedDataManager-HT49OrvF.mjs} +1 -1
  7. package/dist/{ExtensionManager-CWYgw0YW.mjs → ExtensionManager-BDMsY2Dz.mjs} +15 -8
  8. package/dist/{HardwareBreakpoint-B9gZCdFP.mjs → HardwareBreakpoint-Cc2AFq1Y.mjs} +3 -3
  9. package/dist/{HeapAnalyzer-BLDH0dCv.mjs → HeapAnalyzer-DruMgsgj.mjs} +20 -20
  10. package/dist/{HookGeneratorBuilders.core.generators.storage-CtcdK78Q.mjs → HookGeneratorBuilders.core.generators.storage-CTbB4Lcx.mjs} +1 -74
  11. package/dist/{InstrumentationSession-CvPC7Jwy.mjs → InstrumentationSession-DLH0vd-z.mjs} +2 -2
  12. package/dist/{MemoryController-CbVdCIJF.mjs → MemoryController-CMtviNW_.mjs} +3 -3
  13. package/dist/{MemoryScanSession-BsDZbLYm.mjs → MemoryScanSession-ITgb_NMi.mjs} +2 -2
  14. package/dist/{MemoryScanner-Bcpml6II.mjs → MemoryScanner-CiL7Z3ey.mjs} +12 -9
  15. package/dist/{NativeMemoryManager.impl-dZtA1ZGn.mjs → NativeMemoryManager.impl-D9Lkovvn.mjs} +13 -10
  16. package/dist/{NativeMemoryManager.utils-B-FjA2mJ.mjs → NativeMemoryManager.utils-BBlAixF5.mjs} +1 -1
  17. package/dist/{PEAnalyzer-D1lzJ_VG.mjs → PEAnalyzer-DMQ44gen.mjs} +15 -15
  18. package/dist/{PageController-Bqm2kZ_X.mjs → PageController-BPJNqqBN.mjs} +18 -4
  19. package/dist/{PointerChainEngine-BOhyVsjx.mjs → PointerChainEngine-K7wN8Z-w.mjs} +10 -7
  20. package/dist/ProcessRegistry-zGg12QbE.mjs +74 -0
  21. package/dist/{ResponseBuilder-D3iFYx2N.mjs → ResponseBuilder-CJXWmWNw.mjs} +10 -10
  22. package/dist/{ScriptManager-aHHq0X7U.mjs → ScriptManager-ZuWD-0Jg.mjs} +195 -192
  23. package/dist/{Speedhack-CqdIFlQl.mjs → Speedhack-D-z0umeT.mjs} +2 -2
  24. package/dist/{StructureAnalyzer-DhFaPvRO.mjs → StructureAnalyzer-Cav5AVSL.mjs} +9 -6
  25. package/dist/{ToolCatalog-C0JGZoOm.mjs → ToolCatalog-5OJdMiF0.mjs} +81 -81
  26. package/dist/{ToolProbe-oC7aPrkv.mjs → ToolProbe-DbCFGyrg.mjs} +1 -1
  27. package/dist/{ToolRegistry-BjaF4oNz.mjs → ToolRegistry-B9krbTtI.mjs} +51 -2
  28. package/dist/{ToolRouter.policy-BWV67ZK-.mjs → ToolRouter.policy-BGDAGyeH.mjs} +60 -20
  29. package/dist/TraceRecorder-B41Z5XBj.mjs +1286 -0
  30. package/dist/{Win32API-CePkipZY.mjs → Win32API-C2kjj0ze.mjs} +18 -12
  31. package/dist/{Win32Debug-BvKs-gxc.mjs → Win32Debug-CKrGOTpo.mjs} +2 -2
  32. package/dist/{WorkflowEngine-CuvkZtWu.mjs → WorkflowEngine-DJ6M4opp.mjs} +226 -255
  33. package/dist/analysis-BHeJW2Nb.mjs +1234 -0
  34. package/dist/{antidebug-CqDTB_uk.mjs → antidebug-BRKeyt27.mjs} +3 -3
  35. package/dist/{artifactRetention-CFEprwPw.mjs → artifactRetention-CPXkUJXp.mjs} +13 -6
  36. package/dist/{artifacts-Bk2-_uPq.mjs → artifacts-DkfosXH3.mjs} +1 -1
  37. package/dist/authorization-schema-DRqyJMSk.mjs +31 -0
  38. package/dist/{binary-instrument-CXfpx6fT.mjs → binary-instrument--V3MAhJ4.mjs} +19 -27
  39. package/dist/bind-helpers-ClV34xdn.mjs +42 -0
  40. package/dist/{boringssl-inspector-BH2D3VKc.mjs → boringssl-inspector-Bo_LOLaS.mjs} +1 -1
  41. package/dist/{browser-BpOr5PEx.mjs → browser-Dx3_S2cG.mjs} +324 -37
  42. package/dist/capabilities-CcHlvWgK.mjs +33 -0
  43. package/dist/{constants-B0OANIBL.mjs → constants-CDZLOoVv.mjs} +18 -3
  44. package/dist/{coordination-qUbyF8KU.mjs → coordination-DgItD9DL.mjs} +2 -2
  45. package/dist/{debugger-gnKxRSN0.mjs → debugger-RS3RSAqs.mjs} +30 -13
  46. package/dist/definitions-BEoYofW5.mjs +47 -0
  47. package/dist/{definitions-bAhHQJq9.mjs → definitions-BRaefg3u.mjs} +11 -5
  48. package/dist/{definitions-DVGfrn7y.mjs → definitions-BbkvZkiv.mjs} +2 -2
  49. package/dist/definitions-BtWSHJ3o.mjs +17 -0
  50. package/dist/{definitions-BMfYXoNC.mjs → definitions-C1gCHO0i.mjs} +1 -1
  51. package/dist/{definitions-C1UvM5Iy.mjs → definitions-CDOg_b-l.mjs} +14 -2
  52. package/dist/definitions-CVPD9hzZ.mjs +54 -0
  53. package/dist/{definitions-Cke7zEb8.mjs → definitions-Cea8Lgl7.mjs} +1 -1
  54. package/dist/definitions-DAgIyjxM.mjs +10 -0
  55. package/dist/{definitions-B4rAvHNZ.mjs → definitions-DJA27nsL.mjs} +12 -9
  56. package/dist/{definitions-ClJLzsJQ.mjs → definitions-DKPFU3LW.mjs} +1 -1
  57. package/dist/{definitions-D3VsGcvz.mjs → definitions-DPRpZQ96.mjs} +7 -7
  58. package/dist/{definitions-B18eyf0B.mjs → definitions-DUE5gmdn.mjs} +1 -1
  59. package/dist/definitions-DYVjOtxa.mjs +26 -0
  60. package/dist/{definitions-BB_4jnmy.mjs → definitions-DcYLVLCo.mjs} +1 -1
  61. package/dist/{definitions-Beid2EB3.mjs → definitions-Pp5LI2H4.mjs} +1 -1
  62. package/dist/definitions-j9KdHVNR.mjs +14 -0
  63. package/dist/definitions-uzkjBwa7.mjs +258 -0
  64. package/dist/{definitions-Cq-zroAU.mjs → definitions-va-AnLuQ.mjs} +4 -4
  65. package/dist/{encoding-Bvz5jLRv.mjs → encoding-DJeqHmpd.mjs} +18 -4
  66. package/dist/{evidence-graph-bridge-C_fv9PuC.mjs → evidence-graph-bridge-DcYizFk2.mjs} +1 -0
  67. package/dist/{factory-DxlGh9Xf.mjs → factory-C90tBff6.mjs} +6 -6
  68. package/dist/flat-target-session-Dgax2Cy3.mjs +29 -0
  69. package/dist/{graphql-DYWzJ29s.mjs → graphql-CoHrhweh.mjs} +205 -34
  70. package/dist/{handlers-C67ktuRN.mjs → handlers-4jmR0nMs.mjs} +220 -32
  71. package/dist/{handlers-DlCJN4Td.mjs → handlers-BAHPxcch.mjs} +122 -90
  72. package/dist/{handlers-9sAbfIg-.mjs → handlers-BOs9b907.mjs} +849 -801
  73. package/dist/{handlers-DxGIq15_2.mjs → handlers-BWXEy6ef.mjs} +16 -16
  74. package/dist/{handlers-tB9Mp9ZK.mjs → handlers-Bndn6QvE.mjs} +31 -4
  75. package/dist/{handlers-CTsDAO6p.mjs → handlers-BqC4bD4s.mjs} +1 -1
  76. package/dist/{handlers-C87g8oCe.mjs → handlers-BtYq60bM2.mjs} +1 -1
  77. package/dist/{handlers-DeLOCd5m.mjs → handlers-BzgcB4iv.mjs} +17 -17
  78. package/dist/{handlers-Cgyg6c0U.mjs → handlers-CRyRWj2b.mjs} +237 -23
  79. package/dist/{handlers-U6L4xhuF.mjs → handlers-CVv2H1uq.mjs} +24 -17
  80. package/dist/{handlers-tiy7EIBp.mjs → handlers-Dl5a7JS4.mjs} +3 -3
  81. package/dist/{handlers-D6j6yka7.mjs → handlers-Dx2d7jt7.mjs} +1893 -1480
  82. package/dist/{handlers-Bl8zkwz1.mjs → handlers-Dz9PYsCa.mjs} +95 -6
  83. package/dist/handlers-HujRKC3b.mjs +661 -0
  84. package/dist/{handlers.impl-DS0d9fUw.mjs → handlers.impl-XWXkQfyi.mjs} +70 -24
  85. package/dist/{hooks-CzCWByww.mjs → hooks-B1B8NRHL.mjs} +3 -3
  86. package/dist/index.mjs +154 -144
  87. package/dist/{maintenance-P7ePRXQC.mjs → maintenance-PRMkLVRW.mjs} +35 -30
  88. package/dist/manifest-67Bok-Si.mjs +58 -0
  89. package/dist/{manifest-B3QVVeBS.mjs → manifest-6lNTMZAB2.mjs} +33 -28
  90. package/dist/manifest-B2duEHiH.mjs +90 -0
  91. package/dist/manifest-B6EY9Vm8.mjs +57 -0
  92. package/dist/{manifest-gZ4s_UtG.mjs → manifest-B6nKSbyY.mjs} +32 -33
  93. package/dist/{manifest-2ToTpjv8.mjs → manifest-BL8AQNPF.mjs} +31 -31
  94. package/dist/{manifest-DzwvxPJX.mjs → manifest-BSZvJJmV.mjs} +23 -14
  95. package/dist/{manifest-Sc_0JQ13.mjs → manifest-BU7qzUyX.mjs} +23 -23
  96. package/dist/{manifest-CT7zZBV1.mjs → manifest-Bl62e8WK.mjs} +24 -23
  97. package/dist/manifest-Bo5cXjdt.mjs +82 -0
  98. package/dist/manifest-BpS4gtUK.mjs +1347 -0
  99. package/dist/manifest-Bv65_e2W.mjs +101 -0
  100. package/dist/manifest-BytNIF4Z.mjs +117 -0
  101. package/dist/{manifest-BqrQ4Tpj.mjs → manifest-C-xtsjS3.mjs} +23 -23
  102. package/dist/{manifest-NXctwWQq.mjs → manifest-CDYl7OhA.mjs} +36 -38
  103. package/dist/manifest-CRZ3xmkD.mjs +61 -0
  104. package/dist/manifest-CoW6u4Tp.mjs +132 -0
  105. package/dist/manifest-Cq5zN_8A.mjs +50 -0
  106. package/dist/{manifest-CAhOuvSl.mjs → manifest-D7YZM_2e.mjs} +75 -85
  107. package/dist/{manifest-DCyjf4n2.mjs → manifest-DE_VrAeQ.mjs} +27 -7
  108. package/dist/manifest-DGsXSCpT.mjs +39 -0
  109. package/dist/{manifest-BB2J8IMJ.mjs → manifest-DJ2vfEuW.mjs} +48 -41
  110. package/dist/{manifest-3g71z6Bg.mjs → manifest-DPXDYhEu.mjs} +26 -25
  111. package/dist/manifest-Dd4fQb0a.mjs +322 -0
  112. package/dist/{manifest-CXsRWjjI.mjs → manifest-Deq6opGg.mjs} +95 -96
  113. package/dist/{manifest-C9RT5nk32.mjs → manifest-DfJTafJK.mjs} +14 -11
  114. package/dist/manifest-DgOdgN_j.mjs +50 -0
  115. package/dist/{manifest-BmtZzQiQ2.mjs → manifest-DlbMW4v4.mjs} +17 -15
  116. package/dist/{manifest-DrbmZcFl2.mjs → manifest-DmVfbH0w.mjs} +212 -91
  117. package/dist/manifest-Dog6Ddjr.mjs +109 -0
  118. package/dist/manifest-DvgU5FWb.mjs +58 -0
  119. package/dist/manifest-HsfDBs7j.mjs +50 -0
  120. package/dist/manifest-I8oQHvCG.mjs +186 -0
  121. package/dist/manifest-NvH_a-av.mjs +786 -0
  122. package/dist/{manifest-Dh8WBmEW.mjs → manifest-cEJU1v0Z.mjs} +24 -24
  123. package/dist/manifest-wOl5XLB12.mjs +112 -0
  124. package/dist/{modules-C184v-S9.mjs → modules-tZozf0LQ.mjs} +130 -860
  125. package/dist/{mojo-ipc-B_H61Afw.mjs → mojo-ipc-DXNEXEqb.mjs} +141 -26
  126. package/dist/{network-671Cw6hV.mjs → network-CPVvwvFg.mjs} +1329 -823
  127. package/dist/{outputPaths-B1uGmrWZ.mjs → outputPaths-um7lCRY3.mjs} +4 -8
  128. package/dist/{platform-WmNn8Sxb.mjs → platform-CYeFoTWp.mjs} +101 -10
  129. package/dist/{process-QcbIy5Zq.mjs → process-BTbgcVc6.mjs} +251 -346
  130. package/dist/{proxy-DqNs0bAd.mjs → proxy-r8YN6nP1.mjs} +30 -8
  131. package/dist/{registry-D-6e18lB.mjs → registry-Bl8ZQW61.mjs} +3 -3
  132. package/dist/{response-BQVP-xUn.mjs → response-CWhh2aLo.mjs} +7 -1
  133. package/dist/{shared-state-board-DV-dpHFJ.mjs → shared-state-board-BoZnSoj-.mjs} +2 -2
  134. package/dist/{sourcemap-Dq8ez8vS.mjs → sourcemap-BIDHUVXy.mjs} +350 -66
  135. package/dist/{streaming-BUQ0VJsg.mjs → streaming-Dal6utPp.mjs} +13 -13
  136. package/dist/{tool-builder-DCbIC5Eo.mjs → tool-builder-BHJp32mV.mjs} +1 -1
  137. package/dist/{transform-CiYJfNX0.mjs → transform-DRVgGG90.mjs} +18 -14
  138. package/dist/wasm-BYx5UOeG.mjs +1044 -0
  139. package/dist/webcrack-Be0_FccV.mjs +747 -0
  140. package/dist/{workflow-f3xJOcjx.mjs → workflow-BpuKEtvn.mjs} +8 -8
  141. package/package.json +76 -43
  142. package/dist/TraceRecorder-DgxyVbdQ.mjs +0 -519
  143. package/dist/analysis-CL9uACt9.mjs +0 -463
  144. package/dist/bind-helpers-xFfRF-qm.mjs +0 -22
  145. package/dist/definitions-6M-eejaT.mjs +0 -53
  146. package/dist/definitions-B3QdlrHv.mjs +0 -34
  147. package/dist/definitions-CXEI7QC72.mjs +0 -216
  148. package/dist/definitions-C_4r7Fo-2.mjs +0 -14
  149. package/dist/definitions-CkFDALoa.mjs +0 -26
  150. package/dist/definitions-Cy3Sl6gV.mjs +0 -34
  151. package/dist/definitions-LKpC3-nL.mjs +0 -9
  152. package/dist/handlers-DdFzXLvF.mjs +0 -446
  153. package/dist/manifest-82baTv4U.mjs +0 -45
  154. package/dist/manifest-BKbgbSiY.mjs +0 -60
  155. package/dist/manifest-Bcf-TJzH.mjs +0 -848
  156. package/dist/manifest-Bnd7kqEY.mjs +0 -55
  157. package/dist/manifest-BqQX6OQC2.mjs +0 -65
  158. package/dist/manifest-Br4RPFt5.mjs +0 -370
  159. package/dist/manifest-C5qDjysN.mjs +0 -107
  160. package/dist/manifest-CBYWCUBJ.mjs +0 -51
  161. package/dist/manifest-CFADCRa1.mjs +0 -37
  162. package/dist/manifest-CQVhavRF.mjs +0 -114
  163. package/dist/manifest-CV12bcrF.mjs +0 -121
  164. package/dist/manifest-CZLUCfG02.mjs +0 -95
  165. package/dist/manifest-D6phHKFd.mjs +0 -131
  166. package/dist/manifest-DHsnKgP6.mjs +0 -60
  167. package/dist/manifest-Df_dliIe.mjs +0 -55
  168. package/dist/manifest-DhKRAT8_.mjs +0 -92
  169. package/dist/manifest-DlpTj4ic2.mjs +0 -193
  170. package/dist/manifest-DuwHjUa5.mjs +0 -70
  171. package/dist/manifest-qSleDqdO.mjs +0 -1023
  172. package/dist/wasm-DQTnHDs4.mjs +0 -531
  173. /package/dist/{CacheAdapters-CDe5WPSV.mjs → CacheAdapters-jJFy20G-.mjs} +0 -0
  174. /package/dist/{DarwinAPI-BNPxu0RH.mjs → DarwinAPI-ETyy0xyo.mjs} +0 -0
  175. /package/dist/{EventBus-DgPmwpeu.mjs → EventBus-DFKvADm3.mjs} +0 -0
  176. /package/dist/{EvidenceGraphBridge-SFesNera.mjs → EvidenceGraphBridge-318Oi0Lf.mjs} +0 -0
  177. /package/dist/{FingerprintManager-gzWtkKuf.mjs → FingerprintManager-BN4UQWnX.mjs} +0 -0
  178. /package/dist/{PrerequisiteError-Dl33Svkz.mjs → PrerequisiteError-TuyZIs6n.mjs} +0 -0
  179. /package/dist/{ReverseEvidenceGraph-Dlsk94LC.mjs → ReverseEvidenceGraph-C02-gXOh.mjs} +0 -0
  180. /package/dist/{StealthVerifier-Bo4T3bz8.mjs → StealthVerifier-BWmPgQsv.mjs} +0 -0
  181. /package/dist/{VersionDetector-CwVLVdDM.mjs → VersionDetector-K3V4vGsw.mjs} +0 -0
  182. /package/dist/{betterSqlite3-0pqusHHH.mjs → betterSqlite3-DLSBZodi.mjs} +0 -0
  183. /package/dist/{concurrency-Bt0yv1kJ.mjs → concurrency-Drev_Vz9.mjs} +0 -0
  184. /package/dist/{formatAddress-DVkj9kpI.mjs → formatAddress-nnMvEohD.mjs} +0 -0
  185. /package/dist/{parse-args-BlRjqlkL.mjs → parse-args-B4cY5Vx5.mjs} +0 -0
  186. /package/dist/{ssrf-policy-ZaUfvhq7.mjs → ssrf-policy-Dsqd-DTX.mjs} +0 -0
  187. /package/dist/{types-CPhOReNX.mjs → types-DDBWs9UP.mjs} +0 -0
@@ -1,29 +1,31 @@
1
1
  import { t as __exportAll } from "./chunk-CjcI7cDX.mjs";
2
2
  import { t as logger } from "./logger-Dh_xb7_2.mjs";
3
- import { At as MEMORY_MODULES_TIMEOUT_MS, Bt as MEMORY_VMMAP_TIMEOUT_MS, Dt as MEMORY_INJECT_TIMEOUT_MS, Et as MEMORY_DUMP_TIMEOUT_MS, F as DEFAULT_DEBUG_PORT, Ft as MEMORY_READ_TIMEOUT_MS, G as EXTERNAL_TOOL_MAX_STDERR_BYTES, It as MEMORY_SCAN_MAX_BUFFER_BYTES, J as EXTERNAL_TOOL_PROBE_TIMEOUT_MS, K as EXTERNAL_TOOL_MAX_STDOUT_BYTES, Mt as MEMORY_PROCESS_SIGNAL_TIMEOUT_MS, N as DEBUGGER_WAIT_FOR_PAUSED_TIMEOUT_MS, Nt as MEMORY_PROTECTION_PWSH_TIMEOUT_MS, Ot as MEMORY_MAX_READ_BYTES, P as DEBUG_PORT_CANDIDATES, Pt as MEMORY_PROTECTION_QUERY_TIMEOUT_MS, Rt as MEMORY_SCAN_TIMEOUT_MS, Tt as MEMORY_AVAILABILITY_CACHE_TTL_MS, Ut as NATIVE_ADMIN_CHECK_TIMEOUT_MS, Vt as MEMORY_WRITE_TIMEOUT_MS, W as EXTERNAL_TOOL_FORCE_KILL_GRACE_MS, Y as EXTERNAL_TOOL_TIMEOUT_MS, _r as WIN_DEBUG_PORT_POLL_ATTEMPTS, cn as SANDBOX_MEMORY_LIMIT_MB, gt as JSVMP_MAX_ITERATIONS, hr as WATCH_EVAL_TIMEOUT_MS, ht as JSVMP_DEOBFUSCATE_TIMEOUT_MS, jt as MEMORY_PROBE_CMD_TIMEOUT_MS, kt as MEMORY_MAX_WRITE_BYTES, ln as SANDBOX_STACK_SIZE_MB, nn as PROCESS_LAUNCH_WAIT_MS, on as SANDBOX_EXEC_TIMEOUT_MS, rn as PROCESS_LIST_MAX_BUFFER_BYTES, un as SANDBOX_TERMINATE_GRACE_MS, vr as WIN_DEBUG_PORT_POLL_INTERVAL_MS, zt as MEMORY_VMMAP_ENUM_TIMEOUT_MS } from "./constants-B0OANIBL.mjs";
4
- import { a as generateEvalHook, c as generateObjectMethodHook, i as generateAntiDebugBypass, l as ProcessRegistry, n as generateLocalStorageHook, o as generateFunctionHook, r as getInjectionInstructions, s as generateHookTemplate, t as generateCookieHook } from "./HookGeneratorBuilders.core.generators.storage-CtcdK78Q.mjs";
5
- import { i as getProjectRoot, n as getDebuggerSessionsDir } from "./outputPaths-B1uGmrWZ.mjs";
6
- import { i as resolveArtifactPath } from "./artifacts-Bk2-_uPq.mjs";
7
- import "./ConsoleMonitor-CPVQW1Y-.mjs";
8
- import { t as PrerequisiteError } from "./PrerequisiteError-Dl33Svkz.mjs";
9
- import { n as execFileAsync$1, r as executePowerShellScript, t as execAsync$3 } from "./types-CPhOReNX.mjs";
10
- import { v as isKoffiAvailable } from "./Win32API-CePkipZY.mjs";
11
- import { n as cpuLimit, r as ioLimit, t as cdpLimit } from "./concurrency-Bt0yv1kJ.mjs";
12
- import { i as parseProcMaps, r as formatLinuxProtection } from "./factory-DxlGh9Xf.mjs";
13
- import { r as isKoffiAvailable$1, t as findPatternInBuffer } from "./NativeMemoryManager.utils-B-FjA2mJ.mjs";
14
- import { t as nativeMemoryManager } from "./NativeMemoryManager.impl-dZtA1ZGn.mjs";
15
- import { r as CodeCollector } from "./ScriptManager-aHHq0X7U.mjs";
16
- import { a as coverageStopJSWithTimeout, i as coverageStopCSSWithTimeout, n as coverageStartCSSWithTimeout, r as coverageStartJSWithTimeout, s as evaluateWithTimeout } from "./PageController-Bqm2kZ_X.mjs";
17
- import "./ToolRegistry-BjaF4oNz.mjs";
3
+ import { Ar as WIN_DEBUG_PORT_POLL_ATTEMPTS, At as MEMORY_MAX_WRITE_BYTES, Bt as MEMORY_VMMAP_ENUM_TIMEOUT_MS, Dt as MEMORY_DUMP_TIMEOUT_MS, Et as MEMORY_AVAILABILITY_CACHE_TTL_MS, F as DEBUG_PORT_CANDIDATES, Ft as MEMORY_PROTECTION_QUERY_TIMEOUT_MS, G as EXTERNAL_TOOL_FORCE_KILL_GRACE_MS, Ht as MEMORY_WRITE_TIMEOUT_MS, I as DEFAULT_DEBUG_PORT, It as MEMORY_READ_TIMEOUT_MS, K as EXTERNAL_TOOL_MAX_STDERR_BYTES, Lt as MEMORY_SCAN_MAX_BUFFER_BYTES, Mt as MEMORY_PROBE_CMD_TIMEOUT_MS, Nt as MEMORY_PROCESS_SIGNAL_TIMEOUT_MS, Or as WATCH_EVAL_TIMEOUT_MS, Ot as MEMORY_INJECT_TIMEOUT_MS, P as DEBUGGER_WAIT_FOR_PAUSED_TIMEOUT_MS, Pt as MEMORY_PROTECTION_PWSH_TIMEOUT_MS, Vt as MEMORY_VMMAP_TIMEOUT_MS, Wt as NATIVE_ADMIN_CHECK_TIMEOUT_MS, X as EXTERNAL_TOOL_TIMEOUT_MS, Y as EXTERNAL_TOOL_PROBE_TIMEOUT_MS, in as PROCESS_LIST_MAX_BUFFER_BYTES, jr as WIN_DEBUG_PORT_POLL_INTERVAL_MS, jt as MEMORY_MODULES_TIMEOUT_MS, kt as MEMORY_MAX_READ_BYTES, q as EXTERNAL_TOOL_MAX_STDOUT_BYTES, rn as PROCESS_LAUNCH_WAIT_MS, zt as MEMORY_SCAN_TIMEOUT_MS } from "./constants-CDZLOoVv.mjs";
4
+ import { t as ProcessRegistry } from "./ProcessRegistry-zGg12QbE.mjs";
5
+ import { i as getProjectRoot, n as getDebuggerSessionsDir } from "./outputPaths-um7lCRY3.mjs";
6
+ import { a as generateEvalHook, c as generateObjectMethodHook, i as generateAntiDebugBypass, n as generateLocalStorageHook, o as generateFunctionHook, r as getInjectionInstructions, s as generateHookTemplate, t as generateCookieHook } from "./HookGeneratorBuilders.core.generators.storage-CTbB4Lcx.mjs";
7
+ import { i as resolveArtifactPath } from "./artifacts-DkfosXH3.mjs";
8
+ import { n as ConsoleMonitor } from "./ConsoleMonitor-DykL3IAw.mjs";
9
+ import { t as PrerequisiteError } from "./PrerequisiteError-TuyZIs6n.mjs";
10
+ import { n as execFileAsync$1, r as executePowerShellScript, t as execAsync$3 } from "./types-DDBWs9UP.mjs";
11
+ import { v as isKoffiAvailable } from "./Win32API-C2kjj0ze.mjs";
12
+ import { r as ioLimit, t as cdpLimit } from "./concurrency-Drev_Vz9.mjs";
13
+ import { i as parseProcMaps, r as formatLinuxProtection } from "./factory-C90tBff6.mjs";
14
+ import { r as isKoffiAvailable$1, t as findPatternInBuffer } from "./NativeMemoryManager.utils-BBlAixF5.mjs";
15
+ import { t as nativeMemoryManager } from "./NativeMemoryManager.impl-D9Lkovvn.mjs";
16
+ import { r as CodeCollector } from "./ScriptManager-ZuWD-0Jg.mjs";
17
+ import { a as coverageStopJSWithTimeout, i as coverageStopCSSWithTimeout, n as coverageStartCSSWithTimeout, r as coverageStartJSWithTimeout, s as evaluateWithTimeout } from "./PageController-BPJNqqBN.mjs";
18
+ import { n as JSVMPDeobfuscator, t as runWebcrack } from "./webcrack-Be0_FccV.mjs";
19
+ import "./ToolRegistry-B9krbTtI.mjs";
18
20
  import { existsSync, promises, readFileSync } from "fs";
19
21
  import * as path$2 from "path";
20
22
  import { join } from "path";
21
23
  import crypto from "crypto";
22
24
  import { platform, tmpdir } from "node:os";
23
25
  import { closeSync, openSync, promises as promises$1, readFileSync as readFileSync$1, readSync } from "node:fs";
24
- import path$1, { isAbsolute, join as join$1, relative, resolve, sep } from "node:path";
26
+ import { isAbsolute, join as join$1, relative, resolve, sep } from "node:path";
25
27
  import { fileURLToPath } from "node:url";
26
- import { readdir, rm, stat, writeFile } from "node:fs/promises";
28
+ import { writeFile } from "node:fs/promises";
27
29
  import { spawn } from "node:child_process";
28
30
  import { exec as exec$1, execFile as execFile$1, spawn as spawn$1 } from "child_process";
29
31
  import { promisify } from "util";
@@ -35,8 +37,7 @@ import { setImmediate } from "node:timers/promises";
35
37
  import * as parser from "@babel/parser";
36
38
  import traverse from "@babel/traverse";
37
39
  import * as t from "@babel/types";
38
- import generate from "@babel/generator";
39
- import { Worker } from "node:worker_threads";
40
+ import "@babel/generator";
40
41
  //#region src/modules/hook/HookGeneratorBuilders.core.generators.network.ts
41
42
  function generateXHRHook(action, customCode, _condition, _performance = false) {
42
43
  return `
@@ -1613,7 +1614,7 @@ var CodeAnalyzer = class {
1613
1614
  callGraph: this.buildCallGraph(functions, code)
1614
1615
  };
1615
1616
  }
1616
- async aiAnalyze(_code, _focus) {
1617
+ async aiAnalyze(_exitCodeValue, _focus) {
1617
1618
  return {};
1618
1619
  }
1619
1620
  detectTechStack(code, aiAnalysis) {
@@ -3041,7 +3042,7 @@ var CryptoDetector = class {
3041
3042
  };
3042
3043
  });
3043
3044
  }
3044
- evaluateSecurity(algorithms, _code) {
3045
+ evaluateSecurity(algorithms, _exitCodeValue) {
3045
3046
  const issues = [];
3046
3047
  const securityRules = this.rulesManager.getSecurityRules();
3047
3048
  algorithms.forEach((algo) => {
@@ -3165,162 +3166,6 @@ function getCalleeFullName(node) {
3165
3166
  return parts.join(".");
3166
3167
  }
3167
3168
  //#endregion
3168
- //#region src/modules/deobfuscator/webcrack.ts
3169
- const DEFAULT_OPTIONS = {
3170
- jsx: true,
3171
- mangle: false,
3172
- unminify: true,
3173
- unpack: true
3174
- };
3175
- const MAX_BUNDLE_MODULES = 100;
3176
- function normalizeOptions(options) {
3177
- return {
3178
- jsx: options.jsx ?? DEFAULT_OPTIONS.jsx,
3179
- mangle: options.mangle ?? DEFAULT_OPTIONS.mangle,
3180
- unminify: options.unminify ?? DEFAULT_OPTIONS.unminify,
3181
- unpack: options.unpack ?? DEFAULT_OPTIONS.unpack
3182
- };
3183
- }
3184
- function isSupportedNodeVersion() {
3185
- const [majorPart = "0", minorPart = "0"] = process.versions.node.split(".");
3186
- const major = Number.parseInt(majorPart, 10);
3187
- const minor = Number.parseInt(minorPart, 10);
3188
- if (!Number.isFinite(major) || !Number.isFinite(minor)) return false;
3189
- if (major === 20) return minor >= 19;
3190
- if (major === 22) return minor >= 12;
3191
- return major > 22;
3192
- }
3193
- function matchesRule(module, rule) {
3194
- const target = rule.target === "path" ? module.path : module.code;
3195
- const matchType = rule.matchType ?? "includes";
3196
- if (matchType === "exact") return target === rule.pattern;
3197
- if (matchType === "regex") try {
3198
- return new RegExp(rule.pattern, "m").test(target);
3199
- } catch {
3200
- return false;
3201
- }
3202
- return target.includes(rule.pattern);
3203
- }
3204
- function applyBundleMappings(bundle, mappings) {
3205
- const remapped = /* @__PURE__ */ new Map();
3206
- if (!mappings || mappings.length === 0) return remapped;
3207
- for (const module of bundle.modules.values()) for (const rule of mappings) {
3208
- if (!rule.path || !rule.pattern) continue;
3209
- if (matchesRule(module, rule)) {
3210
- if (module.path !== rule.path) {
3211
- remapped.set(module.id, { fromPath: module.path });
3212
- module.path = rule.path;
3213
- }
3214
- break;
3215
- }
3216
- }
3217
- return remapped;
3218
- }
3219
- function summarizeBundle(bundle, options, remapped) {
3220
- const maxBundleModules = options.maxBundleModules ?? MAX_BUNDLE_MODULES;
3221
- const modules = Array.from(bundle.modules.values()).toSorted((left, right) => {
3222
- if (left.isEntry !== right.isEntry) return left.isEntry ? -1 : 1;
3223
- return left.path.localeCompare(right.path);
3224
- }).slice(0, maxBundleModules).map((module) => ({
3225
- id: module.id,
3226
- path: module.path,
3227
- isEntry: module.isEntry,
3228
- size: module.code.length,
3229
- code: options.includeModuleCode ? module.code : void 0,
3230
- mappedPathFrom: remapped.get(module.id)?.fromPath
3231
- }));
3232
- return {
3233
- type: bundle.type,
3234
- entryId: bundle.entryId,
3235
- moduleCount: bundle.modules.size,
3236
- truncated: bundle.modules.size > maxBundleModules,
3237
- mappingsApplied: remapped.size,
3238
- modules
3239
- };
3240
- }
3241
- async function collectSavedArtifacts(rootDir, currentDir = rootDir) {
3242
- const entries = await readdir(currentDir, { withFileTypes: true });
3243
- const artifacts = [];
3244
- for (const entry of entries) {
3245
- const fullPath = path$1.join(currentDir, entry.name);
3246
- if (entry.isDirectory()) {
3247
- artifacts.push(...await collectSavedArtifacts(rootDir, fullPath));
3248
- continue;
3249
- }
3250
- if (!entry.isFile()) continue;
3251
- const metadata = await stat(fullPath);
3252
- artifacts.push({
3253
- path: path$1.relative(rootDir, fullPath).replace(/\\/g, "/"),
3254
- size: metadata.size,
3255
- type: "file"
3256
- });
3257
- }
3258
- return artifacts.toSorted((left, right) => left.path.localeCompare(right.path));
3259
- }
3260
- async function runWebcrack(code, options) {
3261
- const optionsUsed = normalizeOptions(options);
3262
- if (!isSupportedNodeVersion()) {
3263
- const reason = `webcrack requires Node.js 20.19+ or 22.12+; current runtime is ${process.versions.node}`;
3264
- logger.warn(reason);
3265
- return {
3266
- applied: false,
3267
- code,
3268
- optionsUsed,
3269
- reason
3270
- };
3271
- }
3272
- try {
3273
- await import("isolated-vm");
3274
- } catch {
3275
- logger.warn("isolated-vm is unavailable (likely Node 24 incompatibility). Deobfuscation sandbox is disabled — do not process untrusted code.");
3276
- }
3277
- try {
3278
- const { webcrack } = await import("webcrack");
3279
- const result = await webcrack(code, {
3280
- jsx: optionsUsed.jsx,
3281
- unpack: optionsUsed.unpack,
3282
- deobfuscate: true,
3283
- unminify: optionsUsed.unminify,
3284
- mangle: optionsUsed.mangle
3285
- });
3286
- const remapped = result.bundle ? applyBundleMappings(result.bundle, options.mappings) : /* @__PURE__ */ new Map();
3287
- let savedTo;
3288
- let savedArtifacts;
3289
- if (typeof options.outputDir === "string" && options.outputDir.trim().length > 0) {
3290
- savedTo = path$1.resolve(options.outputDir);
3291
- const cwd = process.cwd();
3292
- const relFromCwd = path$1.relative(cwd, savedTo);
3293
- if (path$1.isAbsolute(relFromCwd) || relFromCwd.startsWith("..") || savedTo === "/" || savedTo === path$1.parse(savedTo).root) throw new Error(`outputDir must resolve to a path within the project root. Got: ${savedTo}`);
3294
- if (options.forceOutput) await rm(savedTo, {
3295
- recursive: true,
3296
- force: true
3297
- });
3298
- await result.save(savedTo);
3299
- savedArtifacts = await collectSavedArtifacts(savedTo);
3300
- }
3301
- return {
3302
- applied: true,
3303
- code: result.code,
3304
- bundle: result.bundle ? summarizeBundle(result.bundle, {
3305
- includeModuleCode: options.includeModuleCode,
3306
- maxBundleModules: options.maxBundleModules
3307
- }, remapped) : void 0,
3308
- savedTo,
3309
- savedArtifacts,
3310
- optionsUsed
3311
- };
3312
- } catch (error) {
3313
- const reason = error instanceof Error ? error.message : String(error);
3314
- logger.warn("webcrack execution failed, falling back to legacy pipeline", error);
3315
- return {
3316
- applied: false,
3317
- code,
3318
- optionsUsed,
3319
- reason
3320
- };
3321
- }
3322
- }
3323
- //#endregion
3324
3169
  //#region src/modules/deobfuscator/Deobfuscator.utils.ts
3325
3170
  function detectObfuscationType(code) {
3326
3171
  const types = [];
@@ -3570,582 +3415,6 @@ var Deobfuscator = class {
3570
3415
  }
3571
3416
  };
3572
3417
  //#endregion
3573
- //#region src/modules/security/ExecutionSandbox.ts
3574
- /**
3575
- * ExecutionSandbox — Safe code execution for untrusted JavaScript.
3576
- *
3577
- * Uses worker_threads + vm module to isolate dynamic code execution
3578
- * (e.g., deobfuscation eval, packer unpacking).
3579
- *
3580
- * Security:
3581
- * - Runs in a separate worker thread (process isolation)
3582
- * - vm.createContext with empty global (no require, no fs, no net)
3583
- * - Timeout enforcement via worker termination
3584
- * - Memory limit via worker resourceLimits
3585
- */
3586
- const WORKER_SCRIPT = `
3587
- import { workerData, parentPort } from 'node:worker_threads';
3588
- import * as vm from 'node:vm';
3589
-
3590
- const { code, timeoutMs } = workerData;
3591
-
3592
- try {
3593
- // Create an isolated context with minimal globals
3594
- const sandbox = {
3595
- // Safe built-ins only
3596
- parseInt, parseFloat, isNaN, isFinite,
3597
- encodeURIComponent, decodeURIComponent,
3598
- encodeURI, decodeURI,
3599
- JSON: { parse: JSON.parse, stringify: JSON.stringify },
3600
- Math,
3601
- String, Number, Boolean, Array, Object, Map, Set,
3602
- Date, RegExp, Error, TypeError, RangeError,
3603
- Promise,
3604
- Symbol,
3605
- undefined,
3606
- NaN,
3607
- Infinity,
3608
- // Explicitly denied: require, process, __filename, __dirname, Buffer, setTimeout, setInterval, fetch
3609
- };
3610
-
3611
- const context = vm.createContext(sandbox, {
3612
- name: 'jshook-sandbox',
3613
- codeGeneration: { strings: false, wasm: false },
3614
- });
3615
-
3616
- const script = new vm.Script(code, {
3617
- filename: 'sandbox-eval.js',
3618
- timeout: timeoutMs,
3619
- });
3620
-
3621
- const result = script.runInContext(context, { timeout: timeoutMs });
3622
- parentPort.postMessage({ ok: true, output: result });
3623
- } catch (err) {
3624
- parentPort.postMessage({
3625
- ok: false,
3626
- error: err.message || String(err),
3627
- timedOut: err.code === 'ERR_SCRIPT_EXECUTION_TIMEOUT',
3628
- });
3629
- }
3630
- `;
3631
- var ExecutionSandbox = class {
3632
- /**
3633
- * Execute JavaScript in an isolated sandbox.
3634
- * Wrapped in cpuLimit for global concurrency control.
3635
- */
3636
- async execute(request) {
3637
- return cpuLimit(() => this._execute(request));
3638
- }
3639
- _execute(request) {
3640
- const timeoutMs = request.timeoutMs ?? SANDBOX_EXEC_TIMEOUT_MS;
3641
- const memoryLimitMB = request.memoryLimitMB ?? SANDBOX_MEMORY_LIMIT_MB;
3642
- const startTime = Date.now();
3643
- return new Promise((resolve) => {
3644
- let settled = false;
3645
- const terminationTimeout = setTimeout(() => {
3646
- if (!settled) {
3647
- worker.terminate();
3648
- logger.warn(`[ExecutionSandbox] Worker terminated after ${timeoutMs + SANDBOX_TERMINATE_GRACE_MS}ms`);
3649
- finish({
3650
- ok: false,
3651
- error: "Execution timed out (worker terminated)",
3652
- timedOut: true
3653
- });
3654
- }
3655
- }, timeoutMs + SANDBOX_TERMINATE_GRACE_MS);
3656
- const workerOptions = {
3657
- eval: true,
3658
- workerData: {
3659
- code: request.code,
3660
- timeoutMs
3661
- },
3662
- resourceLimits: {
3663
- maxOldGenerationSizeMb: memoryLimitMB,
3664
- maxYoungGenerationSizeMb: Math.ceil(memoryLimitMB / 4),
3665
- stackSizeMb: SANDBOX_STACK_SIZE_MB
3666
- }
3667
- };
3668
- workerOptions.type = "module";
3669
- const worker = new Worker(WORKER_SCRIPT, workerOptions);
3670
- if (typeof worker.unref === "function") worker.unref();
3671
- ProcessRegistry.register(worker);
3672
- const finish = (result) => {
3673
- if (settled) return;
3674
- settled = true;
3675
- if (terminationTimeout) clearTimeout(terminationTimeout);
3676
- resolve({
3677
- ...result,
3678
- durationMs: Date.now() - startTime
3679
- });
3680
- };
3681
- worker.on("message", (msg) => {
3682
- finish({
3683
- ok: msg.ok,
3684
- output: msg.output,
3685
- error: msg.error,
3686
- timedOut: msg.timedOut || false
3687
- });
3688
- worker.terminate();
3689
- });
3690
- worker.on("error", (err) => {
3691
- finish({
3692
- ok: false,
3693
- error: `Worker error: ${err.message}`,
3694
- timedOut: false
3695
- });
3696
- });
3697
- worker.on("exit", (code) => {
3698
- if (!settled) finish({
3699
- ok: false,
3700
- error: `Worker exited unexpectedly with code ${code}`,
3701
- timedOut: false
3702
- });
3703
- });
3704
- });
3705
- }
3706
- };
3707
- //#endregion
3708
- //#region src/modules/deobfuscator/JSVMPDeobfuscator.restore.ts
3709
- async function restoreJSVMPCode(context, code, vmType, aggressive) {
3710
- const warnings = [];
3711
- const unresolvedParts = [];
3712
- if (vmType === "obfuscator.io") return restoreObfuscatorIO(context, code, aggressive, warnings, unresolvedParts);
3713
- if (vmType === "jsfuck") return restoreJSFuck(context, code, warnings);
3714
- if (vmType === "jjencode") return restoreJJEncode(context, code, warnings);
3715
- return restoreCustomVM(context, code, aggressive, warnings, unresolvedParts);
3716
- }
3717
- async function restoreObfuscatorIO(context, code, aggressive, warnings, unresolvedParts) {
3718
- let restored = code;
3719
- let confidence = .5;
3720
- try {
3721
- const stringArrayMatch = code.match(/var\s+(_0x[a-f0-9]+)\s*=\s*(\[.*?\]);/s);
3722
- if (stringArrayMatch) {
3723
- const arrayName = stringArrayMatch[1];
3724
- const arrayContent = stringArrayMatch[2];
3725
- logger.info(` : ${arrayName}`);
3726
- try {
3727
- const sandboxResult = await context.sandbox.execute({
3728
- code: `return ${arrayContent || "[]"};`,
3729
- timeoutMs: 3e3
3730
- });
3731
- const stringArray = sandboxResult.ok ? sandboxResult.output : void 0;
3732
- if (Array.isArray(stringArray)) {
3733
- logger.info(`String array detected, ${stringArray.length} strings found`);
3734
- const refPattern = new RegExp(`${arrayName}\\[(\\d+)\\]`, "g");
3735
- restored = restored.replace(refPattern, (_match, index) => {
3736
- const idx = parseInt(index, 10);
3737
- if (idx < stringArray.length) return JSON.stringify(stringArray[idx]);
3738
- return _match;
3739
- });
3740
- confidence += .2;
3741
- }
3742
- } catch (e) {
3743
- warnings.push(`: ${e}`);
3744
- unresolvedParts.push({
3745
- location: "String Array",
3746
- reason: "",
3747
- suggestion: ""
3748
- });
3749
- }
3750
- }
3751
- restored = restored.replace(/\(function\s*\(_0x[a-f0-9]+,\s*_0x[a-f0-9]+\)\s*\{[\s\S]*?\}\(_0x[a-f0-9]+,\s*0x[a-f0-9]+\)\);?/g, "");
3752
- if (aggressive) {
3753
- restored = restored.replace(/\(function\s*\(\)\s*\{([\s\S]*)\}\(\)\);?/g, "$1");
3754
- confidence += .1;
3755
- }
3756
- restored = restored.replace(/0x([0-9a-f]+)/gi, (_match, hex) => {
3757
- return String(parseInt(hex, 16));
3758
- });
3759
- restored = restored.replace(/;\s*;/g, ";");
3760
- restored = restored.replace(/\{\s*\}/g, "{}");
3761
- warnings.push("obfuscator.io detected, may need special handling");
3762
- return {
3763
- code: restored,
3764
- confidence: Math.min(confidence, 1),
3765
- warnings,
3766
- unresolvedParts: unresolvedParts.length > 0 ? unresolvedParts : void 0
3767
- };
3768
- } catch (error) {
3769
- warnings.push(`obfuscator.io: ${error}`);
3770
- return {
3771
- code,
3772
- confidence: .2,
3773
- warnings,
3774
- unresolvedParts
3775
- };
3776
- }
3777
- }
3778
- async function restoreJSFuck(context, code, warnings) {
3779
- try {
3780
- logger.info("JSFuck detected, attempting deobfuscation...");
3781
- try {
3782
- if (code.length > 1e5) {
3783
- warnings.push("JSFuck code detected, file too large to process directly.");
3784
- warnings.push("Consider using an online JSFuck decoder tool.");
3785
- return {
3786
- code,
3787
- confidence: .1,
3788
- warnings
3789
- };
3790
- }
3791
- const sandboxResult = await context.sandbox.execute({
3792
- code: `return ${code};`,
3793
- timeoutMs: 5e3
3794
- });
3795
- const result = sandboxResult.ok ? sandboxResult.output : void 0;
3796
- if (typeof result === "string") {
3797
- logger.info(" JSFuck");
3798
- return {
3799
- code: result,
3800
- confidence: .9,
3801
- warnings: ["JSFuck"]
3802
- };
3803
- }
3804
- warnings.push("JSFuck");
3805
- return {
3806
- code,
3807
- confidence: .2,
3808
- warnings
3809
- };
3810
- } catch (execError) {
3811
- warnings.push(`JSFuck: ${execError}`);
3812
- warnings.push("Consider using an online JSFuck decoder tool.");
3813
- return {
3814
- code,
3815
- confidence: .1,
3816
- warnings
3817
- };
3818
- }
3819
- } catch (error) {
3820
- warnings.push(`JSFuck: ${error}`);
3821
- return {
3822
- code,
3823
- confidence: .1,
3824
- warnings
3825
- };
3826
- }
3827
- }
3828
- async function restoreJJEncode(context, code, warnings) {
3829
- try {
3830
- logger.info("JJEncode detected, attempting deobfuscation...");
3831
- try {
3832
- const lines = code.split("\n").filter((line) => line.trim());
3833
- if ((lines.length > 0 ? lines[lines.length - 1] : "")?.includes("$$$$")) {
3834
- const sandboxResult = await context.sandbox.execute({
3835
- code: `${code}; return $$$$()`,
3836
- timeoutMs: 5e3
3837
- });
3838
- const result = sandboxResult.ok ? sandboxResult.output : void 0;
3839
- if (typeof result === "string") {
3840
- logger.info(" JJEncode");
3841
- return {
3842
- code: result,
3843
- confidence: .9,
3844
- warnings: ["JJEncode"]
3845
- };
3846
- }
3847
- }
3848
- const sandboxResult = await context.sandbox.execute({
3849
- code,
3850
- timeoutMs: 5e3
3851
- });
3852
- if (!sandboxResult.ok) logger.warn("JJEncode sandbox execution failed:", sandboxResult.error);
3853
- warnings.push("JJEncode deobfuscation may be incomplete");
3854
- warnings.push("Result may still contain JJEncode fragments");
3855
- return {
3856
- code,
3857
- confidence: .2,
3858
- warnings
3859
- };
3860
- } catch (execError) {
3861
- warnings.push(`JJEncode: ${execError}`);
3862
- warnings.push("Result may contain evaluation artifacts");
3863
- return {
3864
- code,
3865
- confidence: .1,
3866
- warnings
3867
- };
3868
- }
3869
- } catch (error) {
3870
- warnings.push(`JJEncode: ${error}`);
3871
- return {
3872
- code,
3873
- confidence: .1,
3874
- warnings
3875
- };
3876
- }
3877
- }
3878
- async function restoreCustomVM(_context, code, aggressive, warnings, unresolvedParts) {
3879
- warnings.push("AI-assisted deobfuscation removed, using fallback directly.");
3880
- return restoreCustomVMBasic(code, aggressive, warnings, unresolvedParts);
3881
- }
3882
- function restoreCustomVMBasic(code, aggressive, warnings, unresolvedParts) {
3883
- let restored = code;
3884
- let confidence = .3;
3885
- try {
3886
- restored = restored.replace(/if\s*\([^)]*\)\s*\{\s*\}/g, "");
3887
- restored = restored.replace(/!!\s*\(/g, "Boolean(");
3888
- restored = restored.replace(/""\s*\+\s*/g, "");
3889
- if (aggressive) {
3890
- restored = restored.replace(/debugger;?/g, "");
3891
- confidence += .1;
3892
- restored = restored.replace(/\?\s*([^:]+)\s*:\s*\1/g, "$1");
3893
- confidence += .05;
3894
- }
3895
- warnings.push("Analysis incomplete, partial results may be returned");
3896
- warnings.push("For better results, configure an LLM API key");
3897
- unresolvedParts.push({
3898
- location: "Custom VM",
3899
- reason: "VM",
3900
- suggestion: "VM protection detected, LLM-assisted analysis recommended"
3901
- });
3902
- return {
3903
- code: restored,
3904
- confidence,
3905
- warnings,
3906
- unresolvedParts: unresolvedParts.length > 0 ? unresolvedParts : void 0
3907
- };
3908
- } catch (error) {
3909
- warnings.push(`: ${error}`);
3910
- return {
3911
- code,
3912
- confidence: .1,
3913
- warnings,
3914
- unresolvedParts
3915
- };
3916
- }
3917
- }
3918
- //#endregion
3919
- //#region src/modules/deobfuscator/JSVMPDeobfuscator.ts
3920
- var JSVMPDeobfuscator = class {
3921
- sandbox = new ExecutionSandbox();
3922
- async deobfuscate(options) {
3923
- const startTime = Date.now();
3924
- const { code, aggressive = false, extractInstructions = false, timeout = JSVMP_DEOBFUSCATE_TIMEOUT_MS, maxIterations = JSVMP_MAX_ITERATIONS } = options;
3925
- logger.info(" JSVMP...");
3926
- try {
3927
- const vmFeatures = this.detectJSVMP(code);
3928
- if (!vmFeatures) {
3929
- logger.info("JSVMP");
3930
- return {
3931
- isJSVMP: false,
3932
- deobfuscatedCode: code,
3933
- confidence: 0,
3934
- warnings: ["JSVMP"]
3935
- };
3936
- }
3937
- logger.info(`JSVMP analysis complete, complexity: ${vmFeatures.complexity}`);
3938
- logger.info(` : ${vmFeatures.instructionCount}`);
3939
- const vmType = this.identifyVMType(code, vmFeatures);
3940
- logger.info(` : ${vmType}`);
3941
- let instructions;
3942
- if (extractInstructions) {
3943
- logger.info(" ...");
3944
- instructions = this.extractInstructions(code, vmFeatures);
3945
- logger.info(` ${instructions.length} `);
3946
- }
3947
- logger.info(" ...");
3948
- const deobfuscationResult = await this.restoreCode(code, vmFeatures, vmType, aggressive, timeout, maxIterations);
3949
- const processingTime = Date.now() - startTime;
3950
- const result = {
3951
- isJSVMP: true,
3952
- vmType,
3953
- vmFeatures,
3954
- instructions,
3955
- deobfuscatedCode: deobfuscationResult.code,
3956
- confidence: deobfuscationResult.confidence,
3957
- warnings: deobfuscationResult.warnings,
3958
- unresolvedParts: deobfuscationResult.unresolvedParts,
3959
- stats: {
3960
- originalSize: code.length,
3961
- deobfuscatedSize: deobfuscationResult.code.length,
3962
- reductionRate: 1 - deobfuscationResult.code.length / code.length,
3963
- processingTime
3964
- }
3965
- };
3966
- logger.info(`JSVMP deobfuscation complete in ${processingTime}ms`);
3967
- logger.info(` : ${(result.confidence * 100).toFixed(1)}%`);
3968
- return result;
3969
- } catch (error) {
3970
- logger.error("JSVMP", error);
3971
- return {
3972
- isJSVMP: false,
3973
- deobfuscatedCode: code,
3974
- confidence: 0,
3975
- warnings: [`: ${error}`]
3976
- };
3977
- }
3978
- }
3979
- detectJSVMP(code) {
3980
- try {
3981
- const ast = parser.parse(code, {
3982
- sourceType: "unambiguous",
3983
- plugins: ["jsx", "typescript"],
3984
- errorRecovery: true
3985
- });
3986
- let hasSwitch = false;
3987
- let hasInstructionArray = false;
3988
- let hasProgramCounter = false;
3989
- let instructionCount = 0;
3990
- let interpreterLocation = "";
3991
- let maxSwitchCases = 0;
3992
- let hasBytecodeArray = false;
3993
- let hasApplyCall = false;
3994
- let hasWhileLoop = false;
3995
- let bytecodePattern = false;
3996
- traverse(ast, {
3997
- SwitchStatement(path) {
3998
- const caseCount = path.node.cases.length;
3999
- if (caseCount > 10) {
4000
- hasSwitch = true;
4001
- if (caseCount > maxSwitchCases) {
4002
- maxSwitchCases = caseCount;
4003
- instructionCount = caseCount;
4004
- interpreterLocation = `Line ${path.node.loc?.start.line || 0}`;
4005
- }
4006
- }
4007
- },
4008
- ArrayExpression(path) {
4009
- if (path.node.elements.length > 50) hasInstructionArray = true;
4010
- },
4011
- UpdateExpression(path) {
4012
- if (path.node.operator === "++" || path.node.operator === "--") {
4013
- const arg = path.node.argument;
4014
- if (t.isIdentifier(arg) && arg.name.length <= 3) hasProgramCounter = true;
4015
- }
4016
- },
4017
- CallExpression(path) {
4018
- if (t.isIdentifier(path.node.callee, { name: "parseInt" }) && path.node.arguments.length >= 2) {
4019
- const firstArg = path.node.arguments[0];
4020
- if (t.isBinaryExpression(firstArg) && firstArg.operator === "+") {
4021
- bytecodePattern = true;
4022
- hasBytecodeArray = true;
4023
- }
4024
- }
4025
- if (t.isMemberExpression(path.node.callee) && t.isIdentifier(path.node.callee.property, { name: "apply" })) hasApplyCall = true;
4026
- },
4027
- WhileStatement(path) {
4028
- if (t.isBooleanLiteral(path.node.test, { value: true }) || t.isNumericLiteral(path.node.test, { value: 1 })) hasWhileLoop = true;
4029
- },
4030
- ForStatement(path) {
4031
- if (!path.node.test) hasWhileLoop = true;
4032
- }
4033
- });
4034
- if (hasSwitch && (hasInstructionArray || hasProgramCounter) && (hasApplyCall || hasWhileLoop || bytecodePattern)) {
4035
- const complexity = instructionCount > 100 ? "high" : instructionCount > 50 ? "medium" : "low";
4036
- logger.info(" JSVMP:");
4037
- logger.info(` - Switch: ${hasSwitch} (${maxSwitchCases} cases)`);
4038
- logger.info(` - : ${hasInstructionArray}`);
4039
- logger.info(` - : ${hasProgramCounter}`);
4040
- logger.info(` - : ${hasBytecodeArray}`);
4041
- logger.info(` - Apply: ${hasApplyCall}`);
4042
- logger.info(` - : ${hasWhileLoop}`);
4043
- logger.info(` - : ${bytecodePattern}`);
4044
- return {
4045
- instructionCount,
4046
- interpreterLocation,
4047
- complexity,
4048
- hasSwitch,
4049
- hasInstructionArray,
4050
- hasProgramCounter
4051
- };
4052
- }
4053
- return null;
4054
- } catch (error) {
4055
- logger.warn("JSVMP analysis failed", error);
4056
- return this.detectJSVMPWithRegex(code);
4057
- }
4058
- }
4059
- detectJSVMPWithRegex(code) {
4060
- const hasSwitch = (code.match(/switch\s*\(/g)?.length || 0) > 0;
4061
- const bytecodePattern = /parseInt\s*\(\s*["']?\s*\+\s*\w+\[/g.test(code);
4062
- const applyPattern = /\.apply\s*\(/g.test(code);
4063
- const whilePattern = /while\s*\(\s*(true|1)\s*\)/g.test(code);
4064
- if (hasSwitch && (bytecodePattern || applyPattern || whilePattern)) {
4065
- logger.info(" JSVMP");
4066
- return {
4067
- instructionCount: 0,
4068
- interpreterLocation: "Unknown",
4069
- complexity: "medium",
4070
- hasSwitch: true,
4071
- hasInstructionArray: bytecodePattern,
4072
- hasProgramCounter: applyPattern
4073
- };
4074
- }
4075
- return null;
4076
- }
4077
- identifyVMType(code, _features) {
4078
- if (code.includes("_0x") && code.includes("function(_0x")) return "obfuscator.io";
4079
- if (/^\s*\[\s*\]\s*\[\s*\(/.test(code)) return "jsfuck";
4080
- if (code.includes("$=~[];")) return "jjencode";
4081
- return "custom";
4082
- }
4083
- extractInstructions(code, features) {
4084
- const instructions = [];
4085
- try {
4086
- traverse(parser.parse(code, {
4087
- sourceType: "unambiguous",
4088
- plugins: ["jsx", "typescript"]
4089
- }), { SwitchStatement: (path) => {
4090
- if (path.node.cases.length === features.instructionCount) path.node.cases.forEach((caseNode, index) => {
4091
- const opcode = caseNode.test ? t.isNumericLiteral(caseNode.test) ? caseNode.test.value : t.isStringLiteral(caseNode.test) ? caseNode.test.value : index : index;
4092
- const type = this.inferInstructionType(caseNode);
4093
- instructions.push({
4094
- opcode,
4095
- name: `INST_${opcode}`,
4096
- type,
4097
- description: `Instruction ${opcode}`
4098
- });
4099
- });
4100
- } });
4101
- } catch (error) {
4102
- logger.warn("", error);
4103
- }
4104
- return instructions;
4105
- }
4106
- inferInstructionType(caseNode) {
4107
- const code = generate(caseNode).code;
4108
- const consequent = caseNode.consequent;
4109
- let hasAssignment = false;
4110
- let hasArrayAccess = false;
4111
- let hasFunctionCall = false;
4112
- let hasArithmetic = false;
4113
- let hasControlFlow = false;
4114
- for (const stmt of consequent) {
4115
- if (t.isExpressionStatement(stmt)) {
4116
- const expr = stmt.expression;
4117
- if (t.isAssignmentExpression(expr)) hasAssignment = true;
4118
- if (t.isMemberExpression(expr) && t.isNumericLiteral(expr.property)) hasArrayAccess = true;
4119
- if (t.isCallExpression(expr)) hasFunctionCall = true;
4120
- if (t.isBinaryExpression(expr)) {
4121
- if ([
4122
- "+",
4123
- "-",
4124
- "*",
4125
- "/",
4126
- "%",
4127
- "**"
4128
- ].includes(expr.operator)) hasArithmetic = true;
4129
- }
4130
- }
4131
- if (t.isIfStatement(stmt) || t.isWhileStatement(stmt) || t.isBreakStatement(stmt) || t.isContinueStatement(stmt) || t.isReturnStatement(stmt)) hasControlFlow = true;
4132
- }
4133
- if ((code.includes("push") || code.includes(".push(")) && (hasArrayAccess || code.includes("["))) return "load";
4134
- if (hasAssignment && !hasArithmetic && !hasFunctionCall) return "store";
4135
- if (hasArithmetic || code.match(/[+\-*/%]/)) return "arithmetic";
4136
- if (hasControlFlow || code.includes("break") || code.includes("continue")) return "control";
4137
- if (hasFunctionCall || code.includes(".apply(") || code.includes(".call(")) return "call";
4138
- return "unknown";
4139
- }
4140
- async restoreCode(code, _features, vmType, aggressive, _timeout, _maxIterations) {
4141
- this.restoreCustomVMBasic;
4142
- return restoreJSVMPCode({ sandbox: this.sandbox }, code, vmType, aggressive);
4143
- }
4144
- restoreCustomVMBasic(code, aggressive, warnings, unresolvedParts) {
4145
- return restoreCustomVMBasic(code, aggressive, warnings, unresolvedParts);
4146
- }
4147
- };
4148
- //#endregion
4149
3418
  //#region src/modules/detector/ObfuscationDetector.ts
4150
3419
  var ObfuscationDetector = class {
4151
3420
  jsvmpDetector;
@@ -5503,10 +4772,10 @@ var DebuggerManager = class {
5503
4772
  pausedResolvers = [];
5504
4773
  breakpointHitCallbacks = /* @__PURE__ */ new Set();
5505
4774
  pauseOnExceptionsState = "none";
5506
- _watchManager = null;
5507
- _xhrManager = null;
5508
- _eventManager = null;
5509
- _blackboxManager = null;
4775
+ watchManager = null;
4776
+ xhrManager = null;
4777
+ eventManager = null;
4778
+ blackboxManager = null;
5510
4779
  advancedFeatureSession = null;
5511
4780
  pausedListener = null;
5512
4781
  resumedListener = null;
@@ -5531,20 +4800,20 @@ var DebuggerManager = class {
5531
4800
  return this.cdpSession;
5532
4801
  }
5533
4802
  getWatchManager() {
5534
- if (!this._watchManager) throw new Error("WatchExpressionManager not initialized. Call initAdvancedFeatures() first.");
5535
- return this._watchManager;
4803
+ if (!this.watchManager) throw new Error("WatchExpressionManager not initialized. Call initAdvancedFeatures() first.");
4804
+ return this.watchManager;
5536
4805
  }
5537
4806
  getXHRManager() {
5538
- if (!this._xhrManager) throw new Error("XHRBreakpointManager not initialized. Call initAdvancedFeatures() first.");
5539
- return this._xhrManager;
4807
+ if (!this.xhrManager) throw new Error("XHRBreakpointManager not initialized. Call initAdvancedFeatures() first.");
4808
+ return this.xhrManager;
5540
4809
  }
5541
4810
  getEventManager() {
5542
- if (!this._eventManager) throw new Error("EventBreakpointManager not initialized. Call initAdvancedFeatures() first.");
5543
- return this._eventManager;
4811
+ if (!this.eventManager) throw new Error("EventBreakpointManager not initialized. Call initAdvancedFeatures() first.");
4812
+ return this.eventManager;
5544
4813
  }
5545
4814
  getBlackboxManager() {
5546
- if (!this._blackboxManager) throw new Error("BlackboxManager not initialized. Call initAdvancedFeatures() first.");
5547
- return this._blackboxManager;
4815
+ if (!this.blackboxManager) throw new Error("BlackboxManager not initialized. Call initAdvancedFeatures() first.");
4816
+ return this.blackboxManager;
5548
4817
  }
5549
4818
  async init() {
5550
4819
  if (this.enabled) return;
@@ -5565,9 +4834,9 @@ var DebuggerManager = class {
5565
4834
  this.enabled = false;
5566
4835
  this.cdpSession = null;
5567
4836
  this.advancedFeatureSession = null;
5568
- this._xhrManager = null;
5569
- this._eventManager = null;
5570
- this._blackboxManager = null;
4837
+ this.xhrManager = null;
4838
+ this.eventManager = null;
4839
+ this.blackboxManager = null;
5571
4840
  });
5572
4841
  await this.cdpSession.send("Debugger.enable");
5573
4842
  this.enabled = true;
@@ -5605,14 +4874,14 @@ var DebuggerManager = class {
5605
4874
  if (!this.enabled || !this.cdpSession) throw new Error("Debugger must be enabled before initializing advanced features. Call init() first.");
5606
4875
  try {
5607
4876
  if (runtimeInspector) {
5608
- this._watchManager = new WatchExpressionManager(runtimeInspector);
4877
+ this.watchManager = new WatchExpressionManager(runtimeInspector);
5609
4878
  logger.info("WatchExpressionManager initialized");
5610
4879
  }
5611
- this._xhrManager = new XHRBreakpointManager(this.cdpSession);
4880
+ this.xhrManager = new XHRBreakpointManager(this.cdpSession);
5612
4881
  logger.info("XHRBreakpointManager initialized");
5613
- this._eventManager = new EventBreakpointManager(this.cdpSession);
4882
+ this.eventManager = new EventBreakpointManager(this.cdpSession);
5614
4883
  logger.info("EventBreakpointManager initialized");
5615
- this._blackboxManager = new BlackboxManager(this.cdpSession);
4884
+ this.blackboxManager = new BlackboxManager(this.cdpSession);
5616
4885
  logger.info("BlackboxManager initialized");
5617
4886
  this.advancedFeatureSession = this.cdpSession;
5618
4887
  logger.info("All advanced debugging features initialized");
@@ -5624,7 +4893,7 @@ var DebuggerManager = class {
5624
4893
  async ensureAdvancedFeatures() {
5625
4894
  await this.ensureSession();
5626
4895
  if (!this.cdpSession) throw new Error("CDP session unavailable after reconnect.");
5627
- if (this.advancedFeatureSession !== this.cdpSession || !this._xhrManager || !this._eventManager || !this._blackboxManager) await this.initAdvancedFeatures();
4896
+ if (this.advancedFeatureSession !== this.cdpSession || !this.xhrManager || !this.eventManager || !this.blackboxManager) await this.initAdvancedFeatures();
5628
4897
  }
5629
4898
  async disable() {
5630
4899
  if (!this.enabled || !this.cdpSession) {
@@ -5632,21 +4901,21 @@ var DebuggerManager = class {
5632
4901
  return;
5633
4902
  }
5634
4903
  try {
5635
- if (this._xhrManager) {
5636
- await this._xhrManager.close();
5637
- this._xhrManager = null;
4904
+ if (this.xhrManager) {
4905
+ await this.xhrManager.close();
4906
+ this.xhrManager = null;
5638
4907
  }
5639
- if (this._eventManager) {
5640
- await this._eventManager.close();
5641
- this._eventManager = null;
4908
+ if (this.eventManager) {
4909
+ await this.eventManager.close();
4910
+ this.eventManager = null;
5642
4911
  }
5643
- if (this._blackboxManager) {
5644
- await this._blackboxManager.close();
5645
- this._blackboxManager = null;
4912
+ if (this.blackboxManager) {
4913
+ await this.blackboxManager.close();
4914
+ this.blackboxManager = null;
5646
4915
  }
5647
- if (this._watchManager) {
5648
- this._watchManager.clearAll();
5649
- this._watchManager = null;
4916
+ if (this.watchManager) {
4917
+ this.watchManager.clearAll();
4918
+ this.watchManager = null;
5650
4919
  }
5651
4920
  if (this.pausedListener) {
5652
4921
  this.cdpSession.off("Debugger.paused", this.pausedListener);
@@ -6116,9 +5385,9 @@ var ExternalToolRunner = class {
6116
5385
  * Wrapped in ioLimit for global concurrency control.
6117
5386
  */
6118
5387
  async run(request) {
6119
- return ioLimit(() => this._run(request));
5388
+ return ioLimit(() => this.runInternal(request));
6120
5389
  }
6121
- async _run(request) {
5390
+ async runInternal(request) {
6122
5391
  const spec = this.registry.getSpec(request.tool);
6123
5392
  const probe = this.registry.getCachedProbe(request.tool);
6124
5393
  if (probe && !probe.available) return {
@@ -6843,7 +6112,7 @@ var PerformanceMonitor = class {
6843
6112
  };
6844
6113
  //#endregion
6845
6114
  //#region src/native/ScriptLoader.ts
6846
- let _scriptsBaseDir = null;
6115
+ let scriptsBaseDir = null;
6847
6116
  function tryGetEsmBaseDir() {
6848
6117
  try {
6849
6118
  const metaUrl = new Function("try { return import.meta.url ?? null; } catch { return null; }")();
@@ -6853,11 +6122,11 @@ function tryGetEsmBaseDir() {
6853
6122
  }
6854
6123
  }
6855
6124
  function getScriptsBaseDir() {
6856
- if (_scriptsBaseDir) return _scriptsBaseDir;
6125
+ if (scriptsBaseDir) return scriptsBaseDir;
6857
6126
  const esmBaseDir = tryGetEsmBaseDir();
6858
6127
  if (esmBaseDir) {
6859
- _scriptsBaseDir = esmBaseDir;
6860
- return _scriptsBaseDir;
6128
+ scriptsBaseDir = esmBaseDir;
6129
+ return scriptsBaseDir;
6861
6130
  }
6862
6131
  return process.cwd();
6863
6132
  }
@@ -8297,9 +7566,9 @@ async function readMemoryWindows(pid, address, size) {
8297
7566
  @{ success = $false; error = $_.Exception.Message } | ConvertTo-Json -Compress
8298
7567
  }
8299
7568
  `, { maxBuffer: 1024 * 1024 * 10 });
8300
- const _trimmed = stdout.trim();
8301
- if (!_trimmed) throw new Error("PowerShell returned empty output");
8302
- const result = JSON.parse(_trimmed);
7569
+ const trimmed = stdout.trim();
7570
+ if (!trimmed) throw new Error("PowerShell returned empty output");
7571
+ const result = JSON.parse(trimmed);
8303
7572
  return {
8304
7573
  success: result.success,
8305
7574
  data: result.data,
@@ -8313,17 +7582,17 @@ async function readMemoryWindows(pid, address, size) {
8313
7582
  };
8314
7583
  }
8315
7584
  }
8316
- let _linuxProvider$1 = null;
8317
- let _linuxProviderChecked$1 = false;
7585
+ let linuxProvider$1 = null;
7586
+ let linuxProviderChecked$1 = false;
8318
7587
  async function getLinuxProvider$1() {
8319
- if (_linuxProviderChecked$1) return _linuxProvider$1;
7588
+ if (linuxProviderChecked$1) return linuxProvider$1;
8320
7589
  try {
8321
- const { createPlatformProvider } = await import("./factory-DxlGh9Xf.mjs").then((n) => n.n);
7590
+ const { createPlatformProvider } = await import("./factory-C90tBff6.mjs").then((n) => n.n);
8322
7591
  const provider = createPlatformProvider();
8323
- if ((await provider.checkAvailability()).available) _linuxProvider$1 = provider;
7592
+ if ((await provider.checkAvailability()).available) linuxProvider$1 = provider;
8324
7593
  } catch {}
8325
- _linuxProviderChecked$1 = true;
8326
- return _linuxProvider$1;
7594
+ linuxProviderChecked$1 = true;
7595
+ return linuxProvider$1;
8327
7596
  }
8328
7597
  function bufferToHex(data, bytesRead) {
8329
7598
  return data.subarray(0, bytesRead).toString("hex").toUpperCase().replace(/../g, "$& ");
@@ -8379,7 +7648,7 @@ async function readMemoryMac(pid, address, size, checkProtectionFn) {
8379
7648
  };
8380
7649
  const addrHex = `0x${address.toString(16)}`;
8381
7650
  try {
8382
- const { createPlatformProvider } = await import("./factory-DxlGh9Xf.mjs").then((n) => n.n);
7651
+ const { createPlatformProvider } = await import("./factory-C90tBff6.mjs").then((n) => n.n);
8383
7652
  const provider = createPlatformProvider();
8384
7653
  if ((await provider.checkAvailability()).available) {
8385
7654
  const handle = provider.openProcess(pid, false);
@@ -8535,9 +7804,9 @@ async function writeMemoryWindows(pid, address, data) {
8535
7804
  @{ success = $false; error = $_.Exception.Message } | ConvertTo-Json -Compress
8536
7805
  }
8537
7806
  `, { maxBuffer: 1024 * 1024 });
8538
- const _trimmed = stdout.trim();
8539
- if (!_trimmed) throw new Error("PowerShell returned empty output");
8540
- const result = JSON.parse(_trimmed);
7807
+ const trimmed = stdout.trim();
7808
+ if (!trimmed) throw new Error("PowerShell returned empty output");
7809
+ const result = JSON.parse(trimmed);
8541
7810
  return {
8542
7811
  success: result.success,
8543
7812
  bytesWritten: result.bytesWritten,
@@ -8551,17 +7820,17 @@ async function writeMemoryWindows(pid, address, data) {
8551
7820
  };
8552
7821
  }
8553
7822
  }
8554
- let _linuxProvider = null;
8555
- let _linuxProviderChecked = false;
7823
+ let linuxProvider = null;
7824
+ let linuxProviderChecked = false;
8556
7825
  async function getLinuxProvider() {
8557
- if (_linuxProviderChecked) return _linuxProvider;
7826
+ if (linuxProviderChecked) return linuxProvider;
8558
7827
  try {
8559
- const { createPlatformProvider } = await import("./factory-DxlGh9Xf.mjs").then((n) => n.n);
7828
+ const { createPlatformProvider } = await import("./factory-C90tBff6.mjs").then((n) => n.n);
8560
7829
  const provider = createPlatformProvider();
8561
- if ((await provider.checkAvailability()).available) _linuxProvider = provider;
7830
+ if ((await provider.checkAvailability()).available) linuxProvider = provider;
8562
7831
  } catch {}
8563
- _linuxProviderChecked = true;
8564
- return _linuxProvider;
7832
+ linuxProviderChecked = true;
7833
+ return linuxProvider;
8565
7834
  }
8566
7835
  async function writeMemoryLinux(pid, address, data) {
8567
7836
  try {
@@ -8614,7 +7883,7 @@ async function writeMemoryMac(pid, address, data, checkProtectionFn) {
8614
7883
  };
8615
7884
  const addrHex = `0x${address.toString(16)}`;
8616
7885
  try {
8617
- const { createPlatformProvider } = await import("./factory-DxlGh9Xf.mjs").then((n) => n.n);
7886
+ const { createPlatformProvider } = await import("./factory-C90tBff6.mjs").then((n) => n.n);
8618
7887
  const provider = createPlatformProvider();
8619
7888
  if ((await provider.checkAvailability()).available) {
8620
7889
  const handle = provider.openProcess(pid, true);
@@ -9078,9 +8347,9 @@ async function scanMemoryWindows(pid, pattern, patternType) {
9078
8347
  addresses: [],
9079
8348
  error: stderr
9080
8349
  };
9081
- const _trimmed = stdout.trim();
9082
- if (!_trimmed) throw new Error("PowerShell returned empty output");
9083
- const result = JSON.parse(_trimmed);
8350
+ const trimmed = stdout.trim();
8351
+ if (!trimmed) throw new Error("PowerShell returned empty output");
8352
+ const result = JSON.parse(trimmed);
9084
8353
  return {
9085
8354
  success: result.success,
9086
8355
  addresses: result.addresses || [],
@@ -9261,7 +8530,7 @@ async function scanMemoryMac(pid, pattern, patternType) {
9261
8530
  * Returns null if the native provider is unavailable.
9262
8531
  */
9263
8532
  async function scanMemoryMacNative(pid, patternBytes, patternMask) {
9264
- const { createPlatformProvider } = await import("./factory-DxlGh9Xf.mjs").then((n) => n.n);
8533
+ const { createPlatformProvider } = await import("./factory-C90tBff6.mjs").then((n) => n.n);
9265
8534
  const provider = createPlatformProvider();
9266
8535
  if (!(await provider.checkAvailability()).available) return null;
9267
8536
  const handle = provider.openProcess(pid, false);
@@ -9469,7 +8738,7 @@ async function scanMemoryFiltered(pid, pattern, addresses, patternType = "hex",
9469
8738
  };
9470
8739
  }
9471
8740
  async function withScopedTaskPort(pid, fn) {
9472
- const { machTaskSelf, taskForPid, machPortDeallocate, KERN } = await import("./DarwinAPI-BNPxu0RH.mjs").then((n) => n.t);
8741
+ const { machTaskSelf, taskForPid, machPortDeallocate, KERN } = await import("./DarwinAPI-ETyy0xyo.mjs").then((n) => n.t);
9473
8742
  const selfTask = machTaskSelf();
9474
8743
  const { kr, task } = taskForPid(selfTask, pid);
9475
8744
  if (kr !== KERN.SUCCESS) return false;
@@ -9483,16 +8752,16 @@ async function suspendProcess(platform, pid) {
9483
8752
  try {
9484
8753
  switch (platform) {
9485
8754
  case "darwin": {
9486
- const { taskSuspend, KERN } = await import("./DarwinAPI-BNPxu0RH.mjs").then((n) => n.t);
8755
+ const { taskSuspend, KERN } = await import("./DarwinAPI-ETyy0xyo.mjs").then((n) => n.t);
9487
8756
  return withScopedTaskPort(pid, (task) => taskSuspend(task) === KERN.SUCCESS);
9488
8757
  }
9489
8758
  case "linux": {
9490
- const { execAsync } = await import("./types-CPhOReNX.mjs").then((n) => n.i);
8759
+ const { execAsync } = await import("./types-DDBWs9UP.mjs").then((n) => n.i);
9491
8760
  await execAsync(`kill -STOP ${pid}`, { timeout: MEMORY_PROCESS_SIGNAL_TIMEOUT_MS });
9492
8761
  return true;
9493
8762
  }
9494
8763
  case "win32": {
9495
- const { execAsync } = await import("./types-CPhOReNX.mjs").then((n) => n.i);
8764
+ const { execAsync } = await import("./types-DDBWs9UP.mjs").then((n) => n.i);
9496
8765
  await execAsync(`powershell -NoProfile -Command "(Add-Type -MemberDefinition '[DllImport("ntdll.dll")] public static extern int NtSuspendProcess(IntPtr h);' -Name W -Namespace N -PassThru)::NtSuspendProcess((Get-Process -Id ${pid}).Handle)"`, { timeout: MEMORY_PROBE_CMD_TIMEOUT_MS });
9497
8766
  return true;
9498
8767
  }
@@ -9507,19 +8776,19 @@ async function resumeProcess(platform, pid) {
9507
8776
  try {
9508
8777
  switch (platform) {
9509
8778
  case "darwin": {
9510
- const { taskResume } = await import("./DarwinAPI-BNPxu0RH.mjs").then((n) => n.t);
8779
+ const { taskResume } = await import("./DarwinAPI-ETyy0xyo.mjs").then((n) => n.t);
9511
8780
  await withScopedTaskPort(pid, (task) => {
9512
8781
  taskResume(task);
9513
8782
  });
9514
8783
  break;
9515
8784
  }
9516
8785
  case "linux": {
9517
- const { execAsync } = await import("./types-CPhOReNX.mjs").then((n) => n.i);
8786
+ const { execAsync } = await import("./types-DDBWs9UP.mjs").then((n) => n.i);
9518
8787
  await execAsync(`kill -CONT ${pid}`, { timeout: MEMORY_PROCESS_SIGNAL_TIMEOUT_MS });
9519
8788
  break;
9520
8789
  }
9521
8790
  case "win32": {
9522
- const { execAsync } = await import("./types-CPhOReNX.mjs").then((n) => n.i);
8791
+ const { execAsync } = await import("./types-DDBWs9UP.mjs").then((n) => n.i);
9523
8792
  await execAsync(`powershell -NoProfile -Command "(Add-Type -MemberDefinition '[DllImport("ntdll.dll")] public static extern int NtResumeProcess(IntPtr h);' -Name W -Namespace N -PassThru)::NtResumeProcess((Get-Process -Id ${pid}).Handle)"`, { timeout: MEMORY_PROBE_CMD_TIMEOUT_MS });
9524
8793
  break;
9525
8794
  }
@@ -9647,9 +8916,9 @@ async function dumpMemoryRegion(platform, pid, startAddress, size, outputPath) {
9647
8916
  maxBuffer: 1024 * 1024,
9648
8917
  timeout: MEMORY_DUMP_TIMEOUT_MS
9649
8918
  });
9650
- const _trimmed = stdout.trim();
9651
- if (!_trimmed) throw new Error("PowerShell returned empty output");
9652
- const result = JSON.parse(_trimmed);
8919
+ const trimmed = stdout.trim();
8920
+ if (!trimmed) throw new Error("PowerShell returned empty output");
8921
+ const result = JSON.parse(trimmed);
9653
8922
  return {
9654
8923
  success: result.success,
9655
8924
  error: result.error
@@ -9857,9 +9126,9 @@ async function enumerateRegions(platform, pid) {
9857
9126
  maxBuffer: 1024 * 1024 * 10,
9858
9127
  timeout: MEMORY_MODULES_TIMEOUT_MS
9859
9128
  });
9860
- const _trimmed = stdout.trim();
9861
- if (!_trimmed) throw new Error("PowerShell returned empty output");
9862
- const result = JSON.parse(_trimmed);
9129
+ const trimmed = stdout.trim();
9130
+ if (!trimmed) throw new Error("PowerShell returned empty output");
9131
+ const result = JSON.parse(trimmed);
9863
9132
  return {
9864
9133
  success: result.success,
9865
9134
  regions: result.regions,
@@ -10009,7 +9278,7 @@ async function checkMemoryProtection(platform, pid, address) {
10009
9278
  }
10010
9279
  if (platform === "darwin") {
10011
9280
  try {
10012
- const { createPlatformProvider } = await import("./factory-DxlGh9Xf.mjs").then((n) => n.n);
9281
+ const { createPlatformProvider } = await import("./factory-C90tBff6.mjs").then((n) => n.n);
10013
9282
  const provider = createPlatformProvider();
10014
9283
  if ((await provider.checkAvailability()).available) {
10015
9284
  const handle = provider.openProcess(pid, false);
@@ -10104,9 +9373,9 @@ async function checkMemoryProtection(platform, pid, address) {
10104
9373
  maxBuffer: 1024 * 1024,
10105
9374
  timeout: MEMORY_PROTECTION_PWSH_TIMEOUT_MS
10106
9375
  });
10107
- const _trimmed = stdout.trim();
10108
- if (!_trimmed) throw new Error("PowerShell returned empty output");
10109
- const result = JSON.parse(_trimmed);
9376
+ const trimmed = stdout.trim();
9377
+ if (!trimmed) throw new Error("PowerShell returned empty output");
9378
+ const result = JSON.parse(trimmed);
10110
9379
  return {
10111
9380
  success: result.success,
10112
9381
  protection: result.protection,
@@ -10217,9 +9486,9 @@ try {
10217
9486
  maxBuffer: 1024 * 1024 * 10,
10218
9487
  timeout: MEMORY_MODULES_TIMEOUT_MS
10219
9488
  });
10220
- const _trimmed = stdout.trim();
10221
- if (!_trimmed) throw new Error("PowerShell returned empty output");
10222
- return JSON.parse(_trimmed);
9489
+ const trimmed = stdout.trim();
9490
+ if (!trimmed) throw new Error("PowerShell returned empty output");
9491
+ return JSON.parse(trimmed);
10223
9492
  } catch (error) {
10224
9493
  logger.error("Module enumeration failed:", error);
10225
9494
  return {
@@ -10371,9 +9640,9 @@ async function injectDll(platform, pid, dllPath) {
10371
9640
  maxBuffer: 1024 * 1024,
10372
9641
  timeout: MEMORY_INJECT_TIMEOUT_MS
10373
9642
  });
10374
- const _trimmed = stdout.trim();
10375
- if (!_trimmed) throw new Error("PowerShell returned empty output");
10376
- const result = JSON.parse(_trimmed);
9643
+ const trimmed = stdout.trim();
9644
+ if (!trimmed) throw new Error("PowerShell returned empty output");
9645
+ const result = JSON.parse(trimmed);
10377
9646
  return {
10378
9647
  success: result.success,
10379
9648
  remoteThreadId: result.remoteThreadId,
@@ -10581,9 +9850,9 @@ def __lldb_init_module(debugger, internal_dict):
10581
9850
  maxBuffer: 1024 * 1024,
10582
9851
  timeout: MEMORY_INJECT_TIMEOUT_MS
10583
9852
  });
10584
- const _trimmed = stdout.trim();
10585
- if (!_trimmed) throw new Error("PowerShell returned empty output");
10586
- const result = JSON.parse(_trimmed);
9853
+ const trimmed = stdout.trim();
9854
+ if (!trimmed) throw new Error("PowerShell returned empty output");
9855
+ const result = JSON.parse(trimmed);
10587
9856
  return {
10588
9857
  success: result.success,
10589
9858
  remoteThreadId: result.remoteThreadId,
@@ -11006,29 +10275,29 @@ var StealthScripts = class StealthScripts {
11006
10275
  */
11007
10276
  static async injectTimingDefense(page) {
11008
10277
  await page.evaluateOnNewDocument(() => {
11009
- const _originalPerfNow = performance.now.bind(performance);
11010
- const _originalDateNow = Date.now;
11011
- let _cdpOffset = 0;
10278
+ const originalPerfNow = performance.now.bind(performance);
10279
+ const originalDateNow = Date.now;
10280
+ let cdpOffset = 0;
11012
10281
  performance.now = function() {
11013
10282
  const win = window;
11014
- if (typeof win.__cdpTimingOffset === "number") _cdpOffset = win.__cdpTimingOffset;
11015
- return _originalPerfNow() - _cdpOffset;
10283
+ if (typeof win.__cdpTimingOffset === "number") cdpOffset = win.__cdpTimingOffset;
10284
+ return originalPerfNow() - cdpOffset;
11016
10285
  };
11017
10286
  Date.now = function() {
11018
10287
  const win = window;
11019
- if (typeof win.__cdpTimingOffset === "number") _cdpOffset = win.__cdpTimingOffset;
11020
- return _originalDateNow.call(Date) - Math.floor(_cdpOffset);
10288
+ if (typeof win.__cdpTimingOffset === "number") cdpOffset = win.__cdpTimingOffset;
10289
+ return originalDateNow.call(Date) - Math.floor(cdpOffset);
11021
10290
  };
11022
- const _OriginalDate = Date;
11023
- const _ProxiedDate = function(...args) {
11024
- if (args.length === 0) return new _OriginalDate(_OriginalDate.now());
11025
- return new _OriginalDate(...args);
10291
+ const OriginalDateValue = Date;
10292
+ const ProxiedDateValue = function(...args) {
10293
+ if (args.length === 0) return new OriginalDateValue(OriginalDateValue.now());
10294
+ return new OriginalDateValue(...args);
11026
10295
  };
11027
- _ProxiedDate.now = _OriginalDate.now;
11028
- _ProxiedDate.parse = _OriginalDate.parse.bind(_OriginalDate);
11029
- _ProxiedDate.UTC = _OriginalDate.UTC.bind(_OriginalDate);
11030
- Object.defineProperty(_ProxiedDate, "prototype", { value: _OriginalDate.prototype });
11031
- globalThis.Date = _ProxiedDate;
10296
+ ProxiedDateValue.now = OriginalDateValue.now;
10297
+ ProxiedDateValue.parse = OriginalDateValue.parse.bind(OriginalDateValue);
10298
+ ProxiedDateValue.UTC = OriginalDateValue.UTC.bind(OriginalDateValue);
10299
+ Object.defineProperty(ProxiedDateValue, "prototype", { value: OriginalDateValue.prototype });
10300
+ globalThis.Date = ProxiedDateValue;
11032
10301
  });
11033
10302
  }
11034
10303
  static async hideWebDriver(page) {
@@ -11354,6 +10623,7 @@ var modules_exports = /* @__PURE__ */ __exportAll({
11354
10623
  AdvancedDeobfuscator: () => AdvancedDeobfuscator,
11355
10624
  CodeAnalyzer: () => CodeAnalyzer,
11356
10625
  CodeCollector: () => CodeCollector,
10626
+ ConsoleMonitor: () => ConsoleMonitor,
11357
10627
  CryptoDetector: () => CryptoDetector,
11358
10628
  DebuggerManager: () => DebuggerManager,
11359
10629
  Deobfuscator: () => Deobfuscator,
@@ -11362,4 +10632,4 @@ var modules_exports = /* @__PURE__ */ __exportAll({
11362
10632
  RuntimeInspector: () => RuntimeInspector
11363
10633
  });
11364
10634
  //#endregion
11365
- export { PerformanceMonitor as a, AICaptchaDetector as c, MemoryManager as i, CamoufoxBrowserManager as l, StealthScripts as n, ExternalToolRunner as o, UnifiedProcessManager as r, runWebcrack as s, modules_exports as t };
10635
+ export { PerformanceMonitor as a, CamoufoxBrowserManager as c, MemoryManager as i, StealthScripts as n, ExternalToolRunner as o, UnifiedProcessManager as r, AICaptchaDetector as s, modules_exports as t };