Skip to content
Back to search

jshook-reverse

SkillWorks with Claude CodeGitHub

"AI-powered JavaScript reverse engineering tool. 资深JavaScript逆向工程专家助手。Actions: collect, search, deobfuscate, understand, summarize, detect-crypto, browser, debugger, breakpoint, debug-step, debug-eval, debug-vars, script, hook, stealth, dom, page. Capabilities: 混淆代码分析、VM破解、Webpack解包、AST转换、Puppeteer/CDP自动化、反检测、指纹伪造、加密识别、参数提取、算法还原、Canvas/WebGL指纹、WebDriver隐藏、CDP调试、断点分析、动态追踪、Hook注入、DOM检查、页面控制。"

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/wuji66dde--jshook-skill/badge.svg)](/listings/wuji66dde--jshook-skill)

HTML

<a href="/listings/wuji66dde--jshook-skill"><img src="/api/listings/wuji66dde--jshook-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

git clone https://github.com/wuji66dde/jshook-skill.git
cd jshook-skill
npm install
npm run build

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 417 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. ---
  2. name: jshook-reverse
  3. description: "AI-powered JavaScript reverse engineering tool. 资深JavaScript逆向工程专家助手。Actions: collect, search, deobfuscate, understand, summarize, detect-crypto, browser, debugger, breakpoint, debug-step, debug-eval, debug-vars, script, hook, stealth, dom, page. Capabilities: 混淆代码分析、VM破解、Webpack解包、AST转换、Puppeteer/CDP自动化、反检测、指纹伪造、加密识别、参数提取、算法还原、Canvas/WebGL指纹、WebDriver隐藏、CDP调试、断点分析、动态追踪、Hook注入、DOM检查、页面控制。"
  4. ---
  5. # JavaScript逆向工程专家
  6. 资深JavaScript逆向工程专家,精通浏览器自动化、代码分析和反混淆。
  7. ## 核心能力
  8. - **逆向工程**:混淆代码分析、VM破解、Webpack解包、AST转换
  9. - **浏览器自动化**:Puppeteer/CDP、反检测、指纹伪造
  10. - **加密识别**:AES/RSA/MD5/SHA识别、参数提取、算法还原
  11. - **反爬虫绕过**:Canvas/WebGL指纹、WebDriver隐藏、行为模拟
  12. - **调试分析**:CDP调试、断点分析、动态追踪、Hook注入
  13. - **Hook注入**:函数拦截、网络监控、属性劫持、事件追踪、反调试绕过
  14. - **反检测伪装**:Stealth脚本注入、指纹伪造、平台预设、WebDriver隐藏
  15. - **DOM检查**:元素查询、结构分析、可点击元素定位
  16. - **页面控制**:导航、点击、输入、截图、性能监控
  17. ## 工作原理
  18. 所有命令通过执行 `node dist/skill.js <command> [args]` 来调用工具。
  19. ## 功能特性
  20. - 智能代码收集 - 支持摘要/优先级/增量模式,防止Token溢出
  21. - AI驱动反混淆 - 支持20+种混淆类型,自动还原代码
  22. - 代码语义理解 - AI辅助分析业务逻辑和加密算法
  23. - AI代码摘要 - 单文件/批量/项目级摘要,自动检测加密/API/混淆特征
  24. - 加密算法检测 - 自动识别AES/RSA/MD5/SHA和自定义算法
  25. - 浏览器自动化 - 自动检测和启动Chrome/Edge,支持任意盘符
  26. - 反检测伪装 - 16项反检测功能,5种平台预设,Canvas/WebGL/AudioContext指纹伪造
  27. - CDP调试器 - 完整的断点管理、执行控制、变量查看
  28. - 脚本管理 - 脚本列表、源码获取、模式查找、内容搜索
  29. - 运行时分析 - 表达式求值、作用域变量、动态追踪
  30. - 统计和缓存 - 完善的缓存机制和统计信息
  31. - 高性能 - 智能压缩、增量收集、按需加载
  32. ## 工具详情
  33. ### 代码收集
  34. | 工具 | 说明 | 功能 |
  35. |------|------|------|
  36. | collect_code | 智能代码收集 | 自动收集页面内联脚本、外部脚本、动态加载脚本、智能摘要模式(防止Token溢出)、优先级模式(关键词优先)、增量模式(按需获取) |
  37. | search_in_scripts | 搜索关键词 | 正则表达式搜索、上下文行数控制、最大匹配数限制、高亮显示匹配结果 |
  38. ### 代码分析
  39. | 工具 | 说明 | 功能 |
  40. |------|------|------|
  41. | deobfuscate | AI驱动的代码反混淆 | 支持20+种混淆类型、变量名还原、控制流平坦化还原、字符串解密、死代码消除 |
  42. | understand | AI辅助的代码语义理解 | 业务逻辑分析、加密算法识别、API调用分析、数据流追踪 |
  43. | summarize | AI生成代码摘要 | 单文件AI摘要生成、批量文件并发摘要、项目级摘要分析、加密/API/混淆特征检测、安全风险评估、复杂度评估和建议 |
  44. | detect_crypto | 检测和分析加密算法 | 标准算法识别(AES/RSA/MD5/SHA)、自定义算法检测、参数提取、密钥定位 |
  45. ### 浏览器控制
  46. | 工具 | 说明 | 功能 |
  47. |------|------|------|
  48. | browser_launch | 启动浏览器 | 自动检测Chrome/Edge、支持任意盘符(C-Z)、多浏览器选择、CDP远程调试连接、反检测脚本注入 |
  49. | browser_status | 获取浏览器状态 | 连接状态、当前页面信息、CDP会话状态 |
  50. | browser_close | 关闭浏览器 | 优雅断开连接、清理CDP会话、进程管理 |
  51. ### 调试分析
  52. | 工具 | 说明 | 功能 |
  53. |------|------|------|
  54. | debugger_control | 调试器控制和状态管理 | 启用/禁用调试器、获取调试器状态、初始化高级功能、Watch表达式管理、XHR断点管理、事件断点管理 |
  55. | breakpoint_manager | 断点管理 | 按URL设置断点、按脚本ID设置断点、条件断点支持、断点列表查看、断点删除和清除 |
  56. | execution_control | 执行控制 | 暂停执行、继续执行、单步进入(Step Into)、单步跳过(Step Over)、单步跳出(Step Out) |
  57. | runtime_evaluator | 运行时表达式求值 | 在当前上下文求值表达式、访问全局变量、访问局部变量、执行任意JavaScript代码 |
  58. | variable_inspector | 变量查看和作用域分析 | 查看当前作用域变量、查看调用帧变量、对象属性展开、变量类型识别 |
  59. | script_manager | 脚本管理和源码获取 | 列出所有已加载脚本、获取脚本源码、按URL模式查找脚本、脚本内容搜索、支持内联和外部脚本 |
  60. ### 反检测伪装
  61. | 工具 | 说明 | 功能 |
  62. |------|------|------|
  63. | stealth_inject | 注入反检测脚本 | 5种平台预设、Chrome 131+ UA字符串、隐藏navigator.webdriver、模拟window.chrome对象、Canvas/WebGL/AudioContext指纹噪声、navigator属性一致性、Permissions/Battery/MediaDevices/Notifications/NetworkInformation API模拟、document.hasFocus()覆盖、16项独立可控功能 |
  64. | stealth_presets | 平台预设管理 | windows-chrome (Win10+Chrome131)、mac-chrome (macOS+Chrome131)、mac-safari (macOS+Safari18.2)、linux-chrome (Linux+Chrome131)、windows-edge (Win10+Edge131) |
  65. ### 数据管理
  66. | 工具 | 说明 | 功能 |
  67. |------|------|------|
  68. | stats | 获取统计信息 | 缓存统计(文件数、大小、命中率)、压缩统计(压缩率、节省空间)、收集统计(URL数、文件数) |
  69. | clear | 清除所有数据 | 清除文件缓存、清除压缩缓存、重置收集状态 |
  70. ## 命令参考
  71. ### 代码收集与搜索
  72. ```bash
  73. # 收集代码
  74. collect <url>
  75. collect <url> --smart-mode=summary
  76. collect <url> --smart-mode=priority --priorities=encrypt,sign
  77. collect <url> --compress --max-total-size=5000000
  78. # 搜索脚本
  79. search <keyword>
  80. search "X-Bogus" --context=10
  81. search "function.*encrypt" --regex --max-matches=50
  82. ```
  83. ### 代码分析
  84. ```bash
  85. # AI反混淆
  86. deobfuscate <code>
  87. # 代码理解
  88. understand <code>
  89. understand <code> --focus=security
  90. # AI摘要
  91. summarize code <code>
  92. summarize collected
  93. summarize collected --batch
  94. # 加密检测
  95. detect-crypto <code>
  96. ```
  97. ### 浏览器控制
  98. ```bash
  99. browser launch # 自动检测并启动
  100. browser status # 查看状态
  101. browser close # 关闭浏览器
  102. ```
  103. ### 调试器
  104. ```bash
  105. # 调试器控制
  106. debugger enable
  107. debugger disable
  108. debugger status
  109. debugger init-advanced # 初始化Watch/XHR/Event/Blackbox
  110. # 断点管理
  111. breakpoint set-url https://example.com/app.js 100
  112. breakpoint set-url https://example.com/app.js 100 0 'x > 10' # 条件断点
  113. breakpoint set-script <scriptId> <line>
  114. breakpoint list
  115. breakpoint remove <id>
  116. breakpoint clear
  117. # 执行控制
  118. debug-step pause
  119. debug-step resume
  120. debug-step into # 单步进入
  121. debug-step over # 单步跳过
  122. debug-step out # 单步跳出
  123. # 表达式求值
  124. debug-eval window.location.href
  125. debug-eval document.cookie
  126. debug-eval JSON.stringify(userData)
  127. # 变量查看
  128. debug-vars
  129. debug-vars <callFrameId>
  130. ```
  131. ### 脚本管理
  132. ```bash
  133. script list # 列出所有已加载脚本
  134. script get <scriptId> # 获取脚本源码
  135. script find *app.js # 按URL模式查找
  136. script search encrypt # 搜索脚本内容
  137. ```
  138. ### Hook注入
  139. ```bash
  140. # 快速生成
  141. hook generate function encryptData
  142. hook generate fetch */api/*
  143. hook generate xhr *sign*
  144. hook generate property window.navigator
  145. hook generate cookie
  146. hook generate websocket
  147. hook generate eval
  148. hook generate timer
  149. # 管理
  150. hook list
  151. hook remove <id>
  152. hook enable <id>
  153. hook disable <id>
  154. hook clear
  155. hook anti-debug # 反调试绕过
  156. hook export json
  157. hook-data # 查看捕获数据
  158. hook-data <hookId>
  159. hook-types # 列出Hook类型
  160. ```
  161. ### 监视表达式
  162. ```bash
  163. watch add "window.location.href" "当前URL"
  164. watch add "userData.token"
  165. watch list
  166. watch evaluate # 求值所有监视表达式
  167. watch remove <id>
  168. watch export
  169. watch import <json>
  170. watch clear
  171. ```
  172. ### XHR断点
  173. ```bash
  174. xhr-breakpoint set */api/*
  175. xhr-breakpoint set *sign*
  176. xhr-breakpoint list
  177. xhr-breakpoint remove <id>
  178. xhr-breakpoint clear
  179. ```
  180. ### 事件断点
  181. ```bash
  182. event-breakpoint set click
  183. event-breakpoint set-mouse # 所有鼠标事件
  184. event-breakpoint set-keyboard # 所有键盘事件
  185. event-breakpoint set-timer # 定时器事件
  186. event-breakpoint set-websocket # WebSocket事件
  187. event-breakpoint list
  188. event-breakpoint remove <id>
  189. event-breakpoint clear
  190. ```
  191. ### 脚本黑盒化
  192. ```bash
  193. blackbox set *jquery*.js
  194. blackbox set *node_modules/*
  195. blackbox set-common # 黑盒化常用库
  196. blackbox list
  197. blackbox remove <pattern>
  198. blackbox clear
  199. ```
  200. ### 反检测伪装
  201. ```bash
  202. stealth inject # 默认注入
  203. stealth inject-preset windows-chrome # 平台预设
  204. stealth inject-preset mac-safari
  205. stealth inject-preset mac-chrome
  206. stealth inject-preset linux-chrome
  207. stealth inject-preset windows-edge
  208. stealth set-ua windows # 设置User-Agent
  209. stealth presets # 列出预设
  210. stealth status # 注入状态
  211. stealth features # 列出所有功能
  212. ```
  213. 反检测功能(16项):
  214. | 功能 | 说明 |
  215. |------|------|
  216. | hideWebdriver | 隐藏 `navigator.webdriver` 属性 |
  217. | mockChrome | 模拟 `window.chrome` 对象 |
  218. | canvasNoise | Canvas 会话级随机种子指纹噪声 |
  219. | webglVendor | 覆盖 WebGL 厂商和渲染器 |
  220. | audioNoise | AudioContext 指纹噪声 |
  221. | navigatorProps | 一致的平台/厂商/核心数/内存 |
  222. | permissionsAPI | 修复 Permissions API 检测 |
  223. | batteryAPI | 模拟 Battery API |
  224. | mediaDevices | 模拟媒体设备 |
  225. | notifications | 模拟 Notifications API |
  226. | networkInfo | 模拟网络信息 API |
  227. | hasFocus | 覆盖 `document.hasFocus()` |
  228. ### DOM检查器
  229. ```bash
  230. dom query #login-button
  231. dom query-all .product-item 20
  232. dom structure 3 true # 深度3,包含文本
  233. dom clickable 登录 # 按文本查找可点击元素
  234. dom style #header
  235. dom wait .loading-spinner 5000 # 等待元素出现
  236. ```
  237. ### 页面控制器
  238. ```bash
  239. page navigate https://example.com
  240. page reload
  241. page back
  242. page forward
  243. page click #submit-button
  244. page type #username admin
  245. page select #country US
  246. page hover .menu-item
  247. page scroll 0 500
  248. page wait-selector .result
  249. page wait-nav
  250. page eval document.title
  251. page url
  252. page title
  253. page content
  254. page screenshot output.png
  255. page metrics
  256. ```
  257. ### 工具命令
  258. ```bash
  259. stats # 收集和缓存统计
  260. stats --type=cache
  261. clear # 清除所有数据
  262. ```
  263. ## 逆向工程工作流
  264. ### 核心理念
  265. 逆向的本质:理解需求 → 定位目标 → 分析实现 → 复现逻辑
  266. 核心技巧:从结果反推过程
  267. - 看到加密参数 → 反推生成函数
  268. - 看到混淆代码 → 反推原始逻辑
  269. - 看到网络请求 → 反推调用链路
  270. ### 标准流程
  271. ```
  272. 1. 启动浏览器并收集
  273. browser launch
  274. collect https://target.com
  275. 2. 快速侦查
  276. search "encrypt"
  277. search "sign"
  278. search "token"
  279. detect-crypto <suspicious_code>
  280. 3. 定位目标函数
  281. script list
  282. script find *app*.js
  283. script search "X-Bogus"
  284. 4. 动态分析
  285. debugger enable
  286. breakpoint set-url https://target.com/app.js 1234
  287. xhr-breakpoint set */api/sign*
  288. debug-step pause → into → over
  289. debug-vars
  290. debug-eval <expression>
  291. 5. Hook监控
  292. hook generate function encryptData
  293. hook generate fetch */api/*
  294. hook-data
  295. 6. 反混淆与理解
  296. deobfuscate <obfuscated_code>
  297. understand <clean_code> --focus=security
  298. 7. 复现逻辑
  299. 根据分析结果,复现加密/签名逻辑
  300. ```
  301. ## 最佳实践
  302. 1. 使用智能摘要模式避免数据过大
  303. 2. 优先收集关键代码(encrypt、crypto、sign)
  304. 3. 使用增量模式按需获取
  305. 4. 从结果反推过程,避免盲目调试
  306. 5. 使用断点和变量查看进行动态分析
  307. 6. 使用dom命令定位页面元素,避免盲目点击
  308. 7. 使用page命令进行页面交互和自动化操作
  309. ## 环境要求
  310. - **Node.js** >= 18.0.0
  311. - **浏览器**:Chrome 或 Edge(自动检测)
  312. - **依赖**:puppeteer、openai 或 anthropic(AI功能)
  313. ## 配置
  314. 环境变量配置在 `.env` 文件中:
  315. | 变量 | 说明 |
  316. |------|------|
  317. | `OPENAI_API_KEY` | OpenAI API密钥(可选) |
  318. | `ANTHROPIC_API_KEY` | Anthropic API密钥(可选) |
  319. | `DEFAULT_LLM_PROVIDER` | 默认LLM提供商(openai/anthropic) |
  320. | `REMOTE_DEBUGGING_PORT` | 远程调试端口(默认9222) |
  321. ## 故障排除
  322. ### 浏览器启动失败
  323. - 检查Chrome/Edge是否已安装
  324. - 检查端口9222是否被占用
  325. - 尝试使用外部浏览器模式
  326. ### AI分析失败
  327. - 检查API密钥是否配置正确
  328. - 检查网络连接
  329. - 检查API配额是否充足
  330. ### DOM查询失败
  331. - 确保浏览器已启动
  332. - 确保页面已加载完成
  333. - 检查选择器是否正确
README.md · README · 457 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # JSHook Reverse Tool
  2. **AI-powered JavaScript Reverse Engineering Skill for Claude Code**
  3. **AI 驱动的 JavaScript 逆向工程工具(Claude Code Skill)**
  4. ---
  5. ## Features | 功能特性
  6. ### Core Capabilities | 核心能力
  7. | Feature | 功能 | Description | 描述 |
  8. |---------|------|-------------|------|
  9. | Smart Code Collection | 智能代码收集 | Summary/Priority/Incremental modes, prevents token overflow | 摘要/优先级/增量模式,防止 Token 溢出 |
  10. | AI Deobfuscation | AI 反混淆 | 20+ obfuscation types, auto-restore code | 支持 20+ 种混淆类型,自动还原代码 |
  11. | Code Understanding | 代码理解 | AI-assisted semantic analysis and business logic | AI 辅助语义理解和业务逻辑分析 |
  12. | Crypto Detection | 加密检测 | AES/RSA/MD5/SHA and custom algorithm detection | 自动识别标准算法和自定义加密 |
  13. | CDP Debugger | CDP 调试器 | Breakpoints, stepping, variable inspection, watch expressions | 断点、单步、变量查看、监视表达式 |
  14. | Hook Injection | Hook 注入 | Function interception, network monitoring, property hijacking | 函数拦截、网络监控、属性劫持 |
  15. | Anti-Detection | 反检测伪装 | 16 stealth features, 5 platform presets, fingerprint spoofing | 16 项反检测功能、5 种平台预设、指纹伪造 |
  16. | Browser Automation | 浏览器自动化 | Auto-detect Chrome/Edge on any drive (C-Z) | 自动检测任意盘符的 Chrome/Edge |
  17. | DOM Inspector | DOM 检查 | Element query, structure analysis, clickable element detection | 元素查询、结构分析、可点击元素定位 |
  18. | Page Controller | 页面控制 | Navigation, click, input, screenshot, performance metrics | 导航、点击、输入、截图、性能监控 |
  19. ### Technical Highlights | 技术亮点
  20. - **CDP Connection** | **CDP 连接** — Chrome DevTools Protocol, stable and reliable | 稳定可靠
  21. - **AST Analysis** | **AST 分析** — Babel-based code parsing, pattern recognition, constant detection | 基于 Babel 的代码解析、模式识别、常量检测
  22. - **Security Audit** | **安全审计** — Weak algorithm detection, insecure config warnings, strength scoring | 弱算法检测、不安全配置告警、强度评分
  23. - **Resource Management** | **资源管理** — Proper CDP session cleanup, memory leak prevention | 完善的 CDP 会话清理,防止内存泄漏
  24. - **Type Safety** | **类型安全** — Strict TypeScript type checking | 严格的 TypeScript 类型检查
  25. ---
  26. ## Installation | 安装
  27. ```bash
  28. git clone https://github.com/wuji66dde/jshook-skill.git
  29. cd jshook-skill
  30. npm install
  31. npm run build
  32. ```
  33. ---
  34. ## Configuration | 配置
  35. Copy `.env.example` to `.env` and set your API keys:
  36. 复制 `.env.example` 到 `.env` 并配置 API 密钥:
  37. ```bash
  38. cp .env.example .env
  39. ```
  40. ```env
  41. # OpenAI API
  42. OPENAI_API_KEY=your-api-key
  43. OPENAI_MODEL=gpt-4
  44. # Or Anthropic | 或使用 Anthropic
  45. ANTHROPIC_API_KEY=your-api-key
  46. ANTHROPIC_MODEL=claude-3-5-sonnet-20241022
  47. # Default LLM Provider | 默认 LLM 提供商
  48. DEFAULT_LLM_PROVIDER=openai
  49. # Remote Debugging Port | 远程调试端口 (optional)
  50. REMOTE_DEBUGGING_PORT=9222
  51. ```
  52. ---
  53. ## Usage as Claude Code Skill | 作为 Claude Code Skill 使用
  54. Add this repository URL to your Claude Code skill configuration:
  55. 将此仓库 URL 添加到 Claude Code Skill 配置中:
  56. ```
  57. https://github.com/wuji66dde/jshook-skill
  58. ```
  59. Then use commands directly in Claude Code:
  60. 然后在 Claude Code 中直接使用命令:
  61. ```
  62. /jshook-reverse collect https://example.com
  63. /jshook-reverse search "encrypt"
  64. /jshook-reverse deobfuscate "var _0x1234=..."
  65. ```
  66. ---
  67. ## Commands Reference | 命令参考
  68. ### Code Collection & Search | 代码收集与搜索
  69. ```bash
  70. # Collect code | 收集代码
  71. collect <url>
  72. collect <url> --smart-mode=summary
  73. collect <url> --smart-mode=priority --priorities=encrypt,sign
  74. collect <url> --compress --max-total-size=5000000
  75. # Search in scripts | 搜索脚本
  76. search <keyword>
  77. search "X-Bogus" --context=10
  78. search "function.*encrypt" --regex --max-matches=50
  79. ```
  80. ### Code Analysis | 代码分析
  81. ```bash
  82. # AI deobfuscation | AI 反混淆
  83. deobfuscate <code>
  84. # Code understanding | 代码理解
  85. understand <code>
  86. understand <code> --focus=security
  87. # AI summary | AI 摘要
  88. summarize code <code>
  89. summarize collected
  90. summarize collected --batch
  91. # Crypto detection | 加密检测
  92. detect-crypto <code>
  93. ```
  94. ### Browser Control | 浏览器控制
  95. ```bash
  96. # Browser lifecycle | 浏览器生命周期
  97. browser launch # Auto-detect & launch | 自动检测并启动
  98. browser status # Check status | 查看状态
  99. browser close # Close browser | 关闭浏览器
  100. ```
  101. ### Debugger | 调试器
  102. ```bash
  103. # Debugger control | 调试器控制
  104. debugger enable
  105. debugger disable
  106. debugger status
  107. debugger init-advanced # Init Watch/XHR/Event/Blackbox | 初始化高级功能
  108. # Breakpoints | 断点管理
  109. breakpoint set-url https://example.com/app.js 100
  110. breakpoint set-url https://example.com/app.js 100 0 'x > 10' # Conditional | 条件断点
  111. breakpoint set-script <scriptId> <line>
  112. breakpoint list
  113. breakpoint remove <id>
  114. breakpoint clear
  115. # Execution control | 执行控制
  116. debug-step pause
  117. debug-step resume
  118. debug-step into # Step Into | 单步进入
  119. debug-step over # Step Over | 单步跳过
  120. debug-step out # Step Out | 单步跳出
  121. # Expression evaluation | 表达式求值
  122. debug-eval window.location.href
  123. debug-eval document.cookie
  124. debug-eval JSON.stringify(userData)
  125. # Variable inspection | 变量查看
  126. debug-vars
  127. debug-vars <callFrameId>
  128. ```
  129. ### Script Management | 脚本管理
  130. ```bash
  131. script list # List all loaded scripts | 列出所有已加载脚本
  132. script get <scriptId> # Get script source | 获取脚本源码
  133. script find *app.js # Find by URL pattern | 按 URL 模式查找
  134. script search encrypt # Search in scripts | 搜索脚本内容
  135. ```
  136. ### Watch Expressions | 监视表达式
  137. ```bash
  138. watch add "window.location.href" "Current URL"
  139. watch add "userData.token"
  140. watch list
  141. watch evaluate # Evaluate all watches | 求值所有监视表达式
  142. watch remove <id>
  143. watch export
  144. watch import <json>
  145. watch clear
  146. ```
  147. ### XHR Breakpoints | XHR 断点
  148. ```bash
  149. xhr-breakpoint set */api/*
  150. xhr-breakpoint set *sign*
  151. xhr-breakpoint list
  152. xhr-breakpoint remove <id>
  153. xhr-breakpoint clear
  154. ```
  155. ### Event Breakpoints | 事件断点
  156. ```bash
  157. event-breakpoint set click
  158. event-breakpoint set-mouse # All mouse events | 所有鼠标事件
  159. event-breakpoint set-keyboard # All keyboard events | 所有键盘事件
  160. event-breakpoint set-timer # Timer events | 定时器事件
  161. event-breakpoint set-websocket # WebSocket events | WebSocket 事件
  162. event-breakpoint list
  163. event-breakpoint remove <id>
  164. event-breakpoint clear
  165. ```
  166. ### Blackbox | 脚本黑盒化
  167. ```bash
  168. blackbox set *jquery*.js
  169. blackbox set *node_modules/*
  170. blackbox set-common # Blackbox common libs | 黑盒化常用库
  171. blackbox list
  172. blackbox remove <pattern>
  173. blackbox clear
  174. ```
  175. ### Hook Injection | Hook 注入
  176. ```bash
  177. # Quick generate | 快速生成
  178. hook generate function encryptData
  179. hook generate fetch */api/*
  180. hook generate xhr *sign*
  181. hook generate property window.navigator
  182. hook generate cookie
  183. hook generate websocket
  184. hook generate eval
  185. hook generate timer
  186. # Management | 管理
  187. hook list
  188. hook remove <id>
  189. hook enable <id>
  190. hook disable <id>
  191. hook clear
  192. hook anti-debug # Anti-debug bypass | 反调试绕过
  193. hook export json
  194. hook-data # View captured data | 查看捕获数据
  195. hook-data <hookId>
  196. hook-types # List hook types | 列出 Hook 类型
  197. ```
  198. ### Anti-Detection Stealth | 反检测伪装
  199. ```bash
  200. stealth inject # Default injection | 默认注入
  201. stealth inject-preset windows-chrome # Platform preset | 平台预设
  202. stealth inject-preset mac-safari
  203. stealth inject-preset mac-chrome
  204. stealth inject-preset linux-chrome
  205. stealth inject-preset windows-edge
  206. stealth set-ua windows # Set User-Agent
  207. stealth presets # List presets | 列出预设
  208. stealth status # Injection status | 注入状态
  209. stealth features # List all features | 列出所有功能
  210. ```
  211. **Stealth Features (16 items) | 反检测功能(16 项):**
  212. | Feature | 功能 | Description | 描述 |
  213. |---------|------|-------------|------|
  214. | hideWebdriver | 隐藏 WebDriver | Hide `navigator.webdriver` | 隐藏 WebDriver 属性 |
  215. | mockChrome | 模拟 Chrome | Simulate `window.chrome` object | 模拟 Chrome 对象 |
  216. | canvasNoise | Canvas 噪声 | Session-level random seed fingerprint noise | 会话级随机种子指纹噪声 |
  217. | webglVendor | WebGL 厂商 | Override WebGL vendor/renderer | 覆盖 WebGL 厂商和渲染器 |
  218. | audioNoise | Audio 噪声 | AudioContext fingerprint noise | AudioContext 指纹噪声 |
  219. | navigatorProps | Navigator 属性 | Consistent platform/vendor/cores/memory | 一致的平台/厂商/核心数/内存 |
  220. | permissionsAPI | Permissions API | Fix Permissions API detection | 修复 Permissions API 检测 |
  221. | batteryAPI | Battery API | Simulate Battery API | 模拟 Battery API |
  222. | mediaDevices | MediaDevices | Simulate media devices | 模拟媒体设备 |
  223. | notifications | Notifications | Simulate Notifications API | 模拟 Notifications API |
  224. | networkInfo | NetworkInfo | Simulate NetworkInformation API | 模拟网络信息 API |
  225. | hasFocus | hasFocus | Override `document.hasFocus()` | 覆盖 hasFocus |
  226. ### DOM Inspector | DOM 检查器
  227. ```bash
  228. dom query #login-button
  229. dom query-all .product-item 20
  230. dom structure 3 true # Depth 3, include text | 深度 3,包含文本
  231. dom clickable 登录 # Find clickable by text | 按文本查找可点击元素
  232. dom style #header
  233. dom wait .loading-spinner 5000 # Wait for element | 等待元素出现
  234. ```
  235. ### Page Controller | 页面控制器
  236. ```bash
  237. page navigate https://example.com
  238. page reload
  239. page back
  240. page forward
  241. page click #submit-button
  242. page type #username admin
  243. page select #country US
  244. page hover .menu-item
  245. page scroll 0 500
  246. page wait-selector .result
  247. page wait-nav
  248. page eval document.title
  249. page url
  250. page title
  251. page content
  252. page screenshot output.png
  253. page metrics
  254. ```
  255. ### Utility | 工具命令
  256. ```bash
  257. stats # Collection & cache stats | 收集和缓存统计
  258. stats --type=cache
  259. clear # Clear all data | 清除所有数据
  260. ```
  261. ---
  262. ## Reverse Engineering Workflow | 逆向工程工作流
  263. A typical JS reverse engineering session:
  264. 典型的 JS 逆向工程流程:
  265. ```
  266. 1. Launch browser & collect | 启动浏览器并收集
  267. browser launch
  268. collect https://target.com
  269. 2. Reconnaissance | 快速侦查
  270. search "encrypt"
  271. search "sign"
  272. search "token"
  273. detect-crypto <suspicious_code>
  274. 3. Locate target function | 定位目标函数
  275. script list
  276. script find *app*.js
  277. script search "X-Bogus"
  278. 4. Dynamic analysis | 动态分析
  279. debugger enable
  280. breakpoint set-url https://target.com/app.js 1234
  281. xhr-breakpoint set */api/sign*
  282. debug-step pause → into → over
  283. debug-vars
  284. debug-eval <expression>
  285. 5. Hook & monitor | Hook 监控
  286. hook generate function encryptData
  287. hook generate fetch */api/*
  288. hook-data
  289. 6. Deobfuscate & understand | 反混淆与理解
  290. deobfuscate <obfuscated_code>
  291. understand <clean_code> --focus=security
  292. 7. Reproduce | 复现逻辑
  293. Based on analysis results, reproduce the encryption/signing logic
  294. 根据分析结果,复现加密/签名逻辑
  295. ```
  296. ---
  297. ## Project Structure | 项目结构
  298. ```
  299. jshook-skill/
  300. ├── src/
  301. │ ├── skill/ # Skill entry & router | Skill 入口和路由
  302. │ │ └── SkillRouter.ts # Command dispatcher (30+ commands) | 命令分发器
  303. │ ├── modules/
  304. │ │ ├── collector/ # Code collection | 代码收集
  305. │ │ │ ├── CodeCollector.ts # Main collector | 主收集器
  306. │ │ │ ├── SmartCodeCollector.ts # Smart modes | 智能模式
  307. │ │ │ ├── CodeCompressor.ts # Compression | 压缩
  308. │ │ │ ├── CodeCache.ts # Caching | 缓存
  309. │ │ │ ├── DOMInspector.ts # DOM inspection | DOM 检查
  310. │ │ │ └── PageController.ts # Page control | 页面控制
  311. │ │ ├── debugger/ # CDP debugger | CDP 调试器
  312. │ │ │ ├── DebuggerManager.ts # Core debugger | 核心调试管理
  313. │ │ │ ├── RuntimeInspector.ts # Runtime inspection | 运行时检查
  314. │ │ │ ├── ScriptManager.ts # Script management | 脚本管理
  315. │ │ │ ├── WatchExpressionManager.ts # Watch expressions | 监视表达式
  316. │ │ │ ├── XHRBreakpointManager.ts # XHR breakpoints | XHR 断点
  317. │ │ │ ├── EventBreakpointManager.ts # Event breakpoints | 事件断点
  318. │ │ │ └── BlackboxManager.ts # Script blackboxing | 脚本黑盒化
  319. │ │ ├── crypto/ # Crypto detection | 加密检测
  320. │ │ │ ├── CryptoDetector.ts # Main detector | 主检测器
  321. │ │ │ ├── CryptoDetectorEnhanced.ts # AST analysis | AST 分析
  322. │ │ │ └── CryptoRules.ts # Detection rules | 检测规则
  323. │ │ ├── deobfuscator/ # Deobfuscation | 反混淆
  324. │ │ │ ├── Deobfuscator.ts # Main deobfuscator | 主反混淆器
  325. │ │ │ ├── AdvancedDeobfuscator.ts # Advanced patterns | 高级模式
  326. │ │ │ ├── ASTOptimizer.ts # AST optimization | AST 优化
  327. │ │ │ ├── JSVMPDeobfuscator.ts # JSVMP cracking | JSVMP 破解
  328. │ │ │ └── PackerDeobfuscator.ts # Packer unpacking | Packer 解包
  329. │ │ ├── hook/ # Hook injection | Hook 注入
  330. │ │ │ ├── HookManager.ts # Hook management | Hook 管理
  331. │ │ │ ├── HookCodeBuilder.ts # Code generation | 代码生成
  332. │ │ │ ├── HookTypeRegistry.ts # Type registry | 类型注册
  333. │ │ │ └── AIHookGenerator.ts # AI-assisted hooks | AI 辅助生成
  334. │ │ ├── stealth/ # Anti-detection | 反检测
  335. │ │ │ └── StealthScripts2025.ts # Stealth scripts | 隐身脚本
  336. │ │ ├── analyzer/ # Code analysis | 代码分析
  337. │ │ │ ├── CodeAnalyzer.ts # Code analyzer | 代码分析器
  338. │ │ │ └── AISummarizer.ts # AI summarizer | AI 摘要器
  339. │ │ └── browser/ # Browser management | 浏览器管理
  340. │ │ └── BrowserModeManager.ts # Browser modes | 浏览器模式
  341. │ ├── services/
  342. │ │ └── LLMService.ts # LLM API service | LLM API 服务
  343. │ ├── types/
  344. │ │ └── index.ts # TypeScript types | 类型定义
  345. │ ├── utils/ # Utilities | 工具类
  346. │ └── skill.ts # Entry point | 入口文件
  347. ├── skill.json # Skill configuration | Skill 配置
  348. ├── package.json
  349. └── tsconfig.json
  350. ```
  351. ---
  352. ## Development | 开发
  353. ```bash
  354. # Dev mode (hot reload) | 开发模式(热重载)
  355. npm run dev
  356. # Build | 构建
  357. npm run build
  358. # Format code | 格式化代码
  359. npm run format
  360. ```
  361. ---
  362. ## Requirements | 环境要求
  363. - **Node.js** >= 18.0.0
  364. - **Browser** | **浏览器**: Chrome or Edge (auto-detected | 自动检测)
  365. - **LLM API Key** | **LLM API 密钥**: OpenAI or Anthropic (for AI features | AI 功能需要)
  366. ---
  367. ## License | 许可证
  368. GPL-3.0

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.