ruoyi-scan 1.2.4__tar.gz

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 (222) hide show
  1. ruoyi_scan-1.2.4/LICENSE +21 -0
  2. ruoyi_scan-1.2.4/PKG-INFO +582 -0
  3. ruoyi_scan-1.2.4/README.md +520 -0
  4. ruoyi_scan-1.2.4/api/__init__.py +1 -0
  5. ruoyi_scan-1.2.4/api/app.py +133 -0
  6. ruoyi_scan-1.2.4/api/auth.py +170 -0
  7. ruoyi_scan-1.2.4/api/deps.py +23 -0
  8. ruoyi_scan-1.2.4/api/metrics.py +109 -0
  9. ruoyi_scan-1.2.4/api/models/__init__.py +1 -0
  10. ruoyi_scan-1.2.4/api/models/schemas.py +136 -0
  11. ruoyi_scan-1.2.4/api/routes/__init__.py +1 -0
  12. ruoyi_scan-1.2.4/api/routes/plugin.py +69 -0
  13. ruoyi_scan-1.2.4/api/routes/report.py +156 -0
  14. ruoyi_scan-1.2.4/api/routes/scan.py +144 -0
  15. ruoyi_scan-1.2.4/api/routes/system.py +63 -0
  16. ruoyi_scan-1.2.4/api/ws/__init__.py +1 -0
  17. ruoyi_scan-1.2.4/api/ws/events.py +34 -0
  18. ruoyi_scan-1.2.4/api/ws/handler.py +169 -0
  19. ruoyi_scan-1.2.4/chains/__init__.py +4 -0
  20. ruoyi_scan-1.2.4/chains/registry.py +84 -0
  21. ruoyi_scan-1.2.4/chains/ruoyi_defaultpw_to_webshell.py +56 -0
  22. ruoyi_scan-1.2.4/chains/ruoyi_nacos_to_dbcreds.py +53 -0
  23. ruoyi_scan-1.2.4/chains/ruoyi_sql_to_rce.py +67 -0
  24. ruoyi_scan-1.2.4/cli/__init__.py +1 -0
  25. ruoyi_scan-1.2.4/cli/chain_runner.py +130 -0
  26. ruoyi_scan-1.2.4/cli/dispatcher.py +159 -0
  27. ruoyi_scan-1.2.4/cli/passive_runner.py +59 -0
  28. ruoyi_scan-1.2.4/cli/plugin_runner.py +116 -0
  29. ruoyi_scan-1.2.4/cli/runner.py +753 -0
  30. ruoyi_scan-1.2.4/cli/serve_runner.py +64 -0
  31. ruoyi_scan-1.2.4/cli/tool_runner.py +117 -0
  32. ruoyi_scan-1.2.4/common/__init__.py +2 -0
  33. ruoyi_scan-1.2.4/common/logger.py +64 -0
  34. ruoyi_scan-1.2.4/common/models.py +117 -0
  35. ruoyi_scan-1.2.4/config/__init__.py +1 -0
  36. ruoyi_scan-1.2.4/config/settings.py +100 -0
  37. ruoyi_scan-1.2.4/core/__init__.py +1 -0
  38. ruoyi_scan-1.2.4/core/auth_chain.py +274 -0
  39. ruoyi_scan-1.2.4/core/cache.py +41 -0
  40. ruoyi_scan-1.2.4/core/captcha_solver.py +215 -0
  41. ruoyi_scan-1.2.4/core/chain.py +639 -0
  42. ruoyi_scan-1.2.4/core/dedup.py +328 -0
  43. ruoyi_scan-1.2.4/core/engine.py +117 -0
  44. ruoyi_scan-1.2.4/core/fingerprint.py +300 -0
  45. ruoyi_scan-1.2.4/core/fingerprint_features.py +164 -0
  46. ruoyi_scan-1.2.4/core/http.py +35 -0
  47. ruoyi_scan-1.2.4/core/loader.py +212 -0
  48. ruoyi_scan-1.2.4/core/orchestrator.py +899 -0
  49. ruoyi_scan-1.2.4/core/portscan.py +262 -0
  50. ruoyi_scan-1.2.4/core/proxy_server.py +219 -0
  51. ruoyi_scan-1.2.4/core/report.py +684 -0
  52. ruoyi_scan-1.2.4/core/report_docx.py +384 -0
  53. ruoyi_scan-1.2.4/core/report_pdf.py +248 -0
  54. ruoyi_scan-1.2.4/core/report_sarif.py +226 -0
  55. ruoyi_scan-1.2.4/core/report_xlsx.py +320 -0
  56. ruoyi_scan-1.2.4/core/router.py +82 -0
  57. ruoyi_scan-1.2.4/core/ruoyi_versions.py +188 -0
  58. ruoyi_scan-1.2.4/core/session.py +157 -0
  59. ruoyi_scan-1.2.4/core/storage.py +291 -0
  60. ruoyi_scan-1.2.4/core/task_registry.py +217 -0
  61. ruoyi_scan-1.2.4/core/waf_features.py +171 -0
  62. ruoyi_scan-1.2.4/data/__init__.py +2 -0
  63. ruoyi_scan-1.2.4/data/pass_top100.txt +84 -0
  64. ruoyi_scan-1.2.4/data/pass_top1000.txt +1000 -0
  65. ruoyi_scan-1.2.4/data/password.txt +1053 -0
  66. ruoyi_scan-1.2.4/data/ruoyi.txt +696 -0
  67. ruoyi_scan-1.2.4/lib/__init__.py +1 -0
  68. ruoyi_scan-1.2.4/lib/ai_generator.py +348 -0
  69. ruoyi_scan-1.2.4/lib/ai_report.py +184 -0
  70. ruoyi_scan-1.2.4/lib/async_engine.py +428 -0
  71. ruoyi_scan-1.2.4/lib/auth_scan.py +281 -0
  72. ruoyi_scan-1.2.4/lib/cache.py +552 -0
  73. ruoyi_scan-1.2.4/lib/ci_runner.py +317 -0
  74. ruoyi_scan-1.2.4/lib/colors.py +24 -0
  75. ruoyi_scan-1.2.4/lib/component_detect.py +487 -0
  76. ruoyi_scan-1.2.4/lib/config_loader.py +363 -0
  77. ruoyi_scan-1.2.4/lib/crawler.py +343 -0
  78. ruoyi_scan-1.2.4/lib/cve_sync.py +536 -0
  79. ruoyi_scan-1.2.4/lib/diff_scan.py +353 -0
  80. ruoyi_scan-1.2.4/lib/distributed.py +883 -0
  81. ruoyi_scan-1.2.4/lib/i18n.py +274 -0
  82. ruoyi_scan-1.2.4/lib/js_extractor.py +276 -0
  83. ruoyi_scan-1.2.4/lib/logic_scan.py +721 -0
  84. ruoyi_scan-1.2.4/lib/matcher.py +264 -0
  85. ruoyi_scan-1.2.4/lib/notifier.py +441 -0
  86. ruoyi_scan-1.2.4/lib/nuclei_loader.py +636 -0
  87. ruoyi_scan-1.2.4/lib/oast.py +452 -0
  88. ruoyi_scan-1.2.4/lib/origin_finder.py +230 -0
  89. ruoyi_scan-1.2.4/lib/plugin_repo.py +478 -0
  90. ruoyi_scan-1.2.4/lib/plugin_sdk.py +526 -0
  91. ruoyi_scan-1.2.4/lib/proxy_pool.py +197 -0
  92. ruoyi_scan-1.2.4/lib/scan_templates.py +265 -0
  93. ruoyi_scan-1.2.4/lib/scheduler.py +285 -0
  94. ruoyi_scan-1.2.4/lib/siem_export.py +523 -0
  95. ruoyi_scan-1.2.4/lib/star_cta.py +76 -0
  96. ruoyi_scan-1.2.4/lib/subdomain.py +259 -0
  97. ruoyi_scan-1.2.4/lib/tamper.py +232 -0
  98. ruoyi_scan-1.2.4/lib/vuln_wiki.py +376 -0
  99. ruoyi_scan-1.2.4/lib/waf_bypass.py +682 -0
  100. ruoyi_scan-1.2.4/lib/web_ui.py +571 -0
  101. ruoyi_scan-1.2.4/main.py +444 -0
  102. ruoyi_scan-1.2.4/plugins/__init__.py +1 -0
  103. ruoyi_scan-1.2.4/plugins/base.py +234 -0
  104. ruoyi_scan-1.2.4/plugins/chain/__init__.py +6 -0
  105. ruoyi_scan-1.2.4/plugins/chain/defaultpw_to_webshell_steps.py +198 -0
  106. ruoyi_scan-1.2.4/plugins/chain/nacos_to_dbcreds_steps.py +193 -0
  107. ruoyi_scan-1.2.4/plugins/chain/sql_to_rce_steps.py +233 -0
  108. ruoyi_scan-1.2.4/plugins/common/__init__.py +31 -0
  109. ruoyi_scan-1.2.4/plugins/common/backup_scan.py +109 -0
  110. ruoyi_scan-1.2.4/plugins/common/cors_misconfig.py +114 -0
  111. ruoyi_scan-1.2.4/plugins/common/dir_listing.py +110 -0
  112. ruoyi_scan-1.2.4/plugins/common/env_leak.py +116 -0
  113. ruoyi_scan-1.2.4/plugins/common/git_leak.py +86 -0
  114. ruoyi_scan-1.2.4/plugins/common/minio_unauth.py +74 -0
  115. ruoyi_scan-1.2.4/plugins/common/redis_unauth.py +93 -0
  116. ruoyi_scan-1.2.4/plugins/common/rocketmq_unauth.py +70 -0
  117. ruoyi_scan-1.2.4/plugins/common/shiro_rememberme.py +111 -0
  118. ruoyi_scan-1.2.4/plugins/common/source_leak.py +113 -0
  119. ruoyi_scan-1.2.4/plugins/common/swagger_leak.py +121 -0
  120. ruoyi_scan-1.2.4/plugins/common/trace_method.py +119 -0
  121. ruoyi_scan-1.2.4/plugins/jeecgboot/__init__.py +25 -0
  122. ruoyi_scan-1.2.4/plugins/jeecgboot/default_password.py +65 -0
  123. ruoyi_scan-1.2.4/plugins/jeecgboot/dict_unauth.py +60 -0
  124. ruoyi_scan-1.2.4/plugins/jeecgboot/file_read_download.py +62 -0
  125. ruoyi_scan-1.2.4/plugins/jeecgboot/file_upload_jmreport.py +75 -0
  126. ruoyi_scan-1.2.4/plugins/jeecgboot/freemarker_ssti.py +73 -0
  127. ruoyi_scan-1.2.4/plugins/jeecgboot/jmreport_list_unauth.py +61 -0
  128. ruoyi_scan-1.2.4/plugins/jeecgboot/sql_inject_jmreport.py +70 -0
  129. ruoyi_scan-1.2.4/plugins/jeecgboot/sql_inject_query_user.py +71 -0
  130. ruoyi_scan-1.2.4/plugins/ruoyi/__init__.py +51 -0
  131. ruoyi_scan-1.2.4/plugins/ruoyi/default_password.py +186 -0
  132. ruoyi_scan-1.2.4/plugins/ruoyi/directory_scan.py +116 -0
  133. ruoyi_scan-1.2.4/plugins/ruoyi/druid_brute.py +115 -0
  134. ruoyi_scan-1.2.4/plugins/ruoyi/file_read.py +79 -0
  135. ruoyi_scan-1.2.4/plugins/ruoyi/file_read_path.py +141 -0
  136. ruoyi_scan-1.2.4/plugins/ruoyi/file_read_time.py +136 -0
  137. ruoyi_scan-1.2.4/plugins/ruoyi/file_upload.py +124 -0
  138. ruoyi_scan-1.2.4/plugins/ruoyi/job_rce.py +172 -0
  139. ruoyi_scan-1.2.4/plugins/ruoyi/nacos_unauth.py +148 -0
  140. ruoyi_scan-1.2.4/plugins/ruoyi/plus_auth_login.py +71 -0
  141. ruoyi_scan-1.2.4/plugins/ruoyi/plus_job_unauth.py +66 -0
  142. ruoyi_scan-1.2.4/plugins/ruoyi/ruoyi_cloud_nacos.py +98 -0
  143. ruoyi_scan-1.2.4/plugins/ruoyi/ruoyi_gen_rce.py +83 -0
  144. ruoyi_scan-1.2.4/plugins/ruoyi/ruoyi_swagger_unauth.py +93 -0
  145. ruoyi_scan-1.2.4/plugins/ruoyi/sql_inject_dept.py +105 -0
  146. ruoyi_scan-1.2.4/plugins/ruoyi/sql_inject_role.py +104 -0
  147. ruoyi_scan-1.2.4/plugins/ruoyi/thymeleaf_ssti.py +158 -0
  148. ruoyi_scan-1.2.4/plugins/ruoyi/unauth_batch.py +186 -0
  149. ruoyi_scan-1.2.4/plugins/spring/__init__.py +36 -0
  150. ruoyi_scan-1.2.4/plugins/spring/actuator_env_rce.py +121 -0
  151. ruoyi_scan-1.2.4/plugins/spring/actuator_unauth.py +103 -0
  152. ruoyi_scan-1.2.4/plugins/spring/cloud_function_rce.py +102 -0
  153. ruoyi_scan-1.2.4/plugins/spring/gateway_rce.py +112 -0
  154. ruoyi_scan-1.2.4/plugins/spring/h2_console_rce.py +110 -0
  155. ruoyi_scan-1.2.4/plugins/spring/heapdump_leak.py +103 -0
  156. ruoyi_scan-1.2.4/plugins/spring/jolokia_mlet_rce.py +102 -0
  157. ruoyi_scan-1.2.4/plugins/spring/jolokia_rce.py +105 -0
  158. ruoyi_scan-1.2.4/plugins/spring/mappings_leak.py +83 -0
  159. ruoyi_scan-1.2.4/plugins/spring/spring4shell.py +111 -0
  160. ruoyi_scan-1.2.4/plugins/spring/spring_boot_admin.py +82 -0
  161. ruoyi_scan-1.2.4/plugins/spring/spring_cloud_config.py +71 -0
  162. ruoyi_scan-1.2.4/plugins/spring/spring_data_rest.py +80 -0
  163. ruoyi_scan-1.2.4/plugins/spring/trace_leak.py +98 -0
  164. ruoyi_scan-1.2.4/pyproject.toml +175 -0
  165. ruoyi_scan-1.2.4/ruoyi_scan.egg-info/PKG-INFO +582 -0
  166. ruoyi_scan-1.2.4/ruoyi_scan.egg-info/SOURCES.txt +220 -0
  167. ruoyi_scan-1.2.4/ruoyi_scan.egg-info/dependency_links.txt +1 -0
  168. ruoyi_scan-1.2.4/ruoyi_scan.egg-info/entry_points.txt +2 -0
  169. ruoyi_scan-1.2.4/ruoyi_scan.egg-info/requires.txt +44 -0
  170. ruoyi_scan-1.2.4/ruoyi_scan.egg-info/top_level.txt +10 -0
  171. ruoyi_scan-1.2.4/setup.cfg +4 -0
  172. ruoyi_scan-1.2.4/tests/test_acceptance_baseline.py +85 -0
  173. ruoyi_scan-1.2.4/tests/test_ai_generator.py +166 -0
  174. ruoyi_scan-1.2.4/tests/test_ai_report.py +143 -0
  175. ruoyi_scan-1.2.4/tests/test_api_scan.py +239 -0
  176. ruoyi_scan-1.2.4/tests/test_api_ws.py +436 -0
  177. ruoyi_scan-1.2.4/tests/test_auth_chain.py +180 -0
  178. ruoyi_scan-1.2.4/tests/test_benchmark.py +207 -0
  179. ruoyi_scan-1.2.4/tests/test_cache.py +115 -0
  180. ruoyi_scan-1.2.4/tests/test_captcha_solver.py +218 -0
  181. ruoyi_scan-1.2.4/tests/test_chain.py +539 -0
  182. ruoyi_scan-1.2.4/tests/test_compliance.py +342 -0
  183. ruoyi_scan-1.2.4/tests/test_component_detect.py +261 -0
  184. ruoyi_scan-1.2.4/tests/test_d11_auth.py +232 -0
  185. ruoyi_scan-1.2.4/tests/test_d14_recon.py +1006 -0
  186. ruoyi_scan-1.2.4/tests/test_d18_d24_fix_reproduce.py +584 -0
  187. ruoyi_scan-1.2.4/tests/test_d19_d27_template_config.py +631 -0
  188. ruoyi_scan-1.2.4/tests/test_d20_d21_d22_d26.py +791 -0
  189. ruoyi_scan-1.2.4/tests/test_d23_d25_d28_d29.py +621 -0
  190. ruoyi_scan-1.2.4/tests/test_d25_plugin_repo.py +409 -0
  191. ruoyi_scan-1.2.4/tests/test_d30_d31_d32_d33.py +962 -0
  192. ruoyi_scan-1.2.4/tests/test_d34_d35_d36_d37.py +747 -0
  193. ruoyi_scan-1.2.4/tests/test_d3_version_matrix.py +144 -0
  194. ruoyi_scan-1.2.4/tests/test_d6_chains.py +276 -0
  195. ruoyi_scan-1.2.4/tests/test_d6_cli.py +98 -0
  196. ruoyi_scan-1.2.4/tests/test_d7_acceptance.py +695 -0
  197. ruoyi_scan-1.2.4/tests/test_d7_engine.py +223 -0
  198. ruoyi_scan-1.2.4/tests/test_d7_plugins.py +207 -0
  199. ruoyi_scan-1.2.4/tests/test_d7_stats.py +385 -0
  200. ruoyi_scan-1.2.4/tests/test_d8_cli.py +262 -0
  201. ruoyi_scan-1.2.4/tests/test_dedup.py +376 -0
  202. ruoyi_scan-1.2.4/tests/test_e2e_full.py +159 -0
  203. ruoyi_scan-1.2.4/tests/test_e2e_full_flow.py +253 -0
  204. ruoyi_scan-1.2.4/tests/test_e9_team.py +188 -0
  205. ruoyi_scan-1.2.4/tests/test_fingerprint.py +456 -0
  206. ruoyi_scan-1.2.4/tests/test_fp_lab.py +136 -0
  207. ruoyi_scan-1.2.4/tests/test_jeecgboot.py +160 -0
  208. ruoyi_scan-1.2.4/tests/test_metrics.py +336 -0
  209. ruoyi_scan-1.2.4/tests/test_middleware.py +177 -0
  210. ruoyi_scan-1.2.4/tests/test_nuclei_loader.py +241 -0
  211. ruoyi_scan-1.2.4/tests/test_orchestrator.py +434 -0
  212. ruoyi_scan-1.2.4/tests/test_origin_finder.py +117 -0
  213. ruoyi_scan-1.2.4/tests/test_proxy_pool.py +155 -0
  214. ruoyi_scan-1.2.4/tests/test_report.py +236 -0
  215. ruoyi_scan-1.2.4/tests/test_report_docx.py +204 -0
  216. ruoyi_scan-1.2.4/tests/test_report_pdf.py +151 -0
  217. ruoyi_scan-1.2.4/tests/test_report_xlsx.py +259 -0
  218. ruoyi_scan-1.2.4/tests/test_run_mode_cta.py +86 -0
  219. ruoyi_scan-1.2.4/tests/test_ruoyi_versions.py +190 -0
  220. ruoyi_scan-1.2.4/tests/test_star_cta.py +58 -0
  221. ruoyi_scan-1.2.4/tests/test_tamper.py +229 -0
  222. ruoyi_scan-1.2.4/tests/test_waf_bypass.py +323 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 XIABAI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,582 @@
1
+ Metadata-Version: 2.4
2
+ Name: ruoyi-scan
3
+ Version: 1.2.4
4
+ Summary: 若依(RuoYi)专项漏洞扫描器 — 插件化架构 / 三态判定 / 38 POC / OAST / 业务逻辑 / 分布式 / SIEM
5
+ Author-email: XIABAI <1204798391@qq.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/xiabai2008/Ruoyi-Scan
8
+ Project-URL: Repository, https://github.com/xiabai2008/Ruoyi-Scan
9
+ Project-URL: Issues, https://github.com/xiabai2008/Ruoyi-Scan/issues
10
+ Keywords: ruoyi,vulnerability-scanner,security,pentest,spring,poc
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Information Technology
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Security
22
+ Requires-Python: >=3.8
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: requests>=2.28
26
+ Requires-Dist: requests-mock>=1.11
27
+ Provides-Extra: report
28
+ Requires-Dist: reportlab>=4.0; extra == "report"
29
+ Requires-Dist: python-docx>=1.1; extra == "report"
30
+ Requires-Dist: openpyxl>=3.1; extra == "report"
31
+ Provides-Extra: serve
32
+ Requires-Dist: fastapi>=0.100; extra == "serve"
33
+ Requires-Dist: uvicorn[standard]>=0.23; extra == "serve"
34
+ Provides-Extra: distributed
35
+ Requires-Dist: redis>=4.5; extra == "distributed"
36
+ Provides-Extra: async
37
+ Requires-Dist: aiohttp>=3.8; extra == "async"
38
+ Provides-Extra: yaml
39
+ Requires-Dist: pyyaml>=6.0; extra == "yaml"
40
+ Provides-Extra: lab
41
+ Requires-Dist: flask>=2.3; extra == "lab"
42
+ Provides-Extra: all
43
+ Requires-Dist: reportlab>=4.0; extra == "all"
44
+ Requires-Dist: python-docx>=1.1; extra == "all"
45
+ Requires-Dist: openpyxl>=3.1; extra == "all"
46
+ Requires-Dist: fastapi>=0.100; extra == "all"
47
+ Requires-Dist: uvicorn[standard]>=0.23; extra == "all"
48
+ Requires-Dist: redis>=4.5; extra == "all"
49
+ Requires-Dist: aiohttp>=3.8; extra == "all"
50
+ Requires-Dist: pyyaml>=6.0; extra == "all"
51
+ Requires-Dist: flask>=2.3; extra == "all"
52
+ Provides-Extra: dev
53
+ Requires-Dist: pytest>=7.4; extra == "dev"
54
+ Requires-Dist: httpx2; extra == "dev"
55
+ Requires-Dist: pytest-timeout>=2.2; extra == "dev"
56
+ Requires-Dist: pytest-cov>=4.1; extra == "dev"
57
+ Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
58
+ Requires-Dist: pytest-benchmark>=4.0; extra == "dev"
59
+ Requires-Dist: ruff>=0.1; extra == "dev"
60
+ Requires-Dist: mypy>=1.5; extra == "dev"
61
+ Dynamic: license-file
62
+
63
+ # Ruoyi-Scan — 若依专项漏洞扫描工具
64
+
65
+ [![CI](https://github.com/xiabai2008/Ruoyi-Scan/actions/workflows/ci.yml/badge.svg)](https://github.com/xiabai2008/Ruoyi-Scan/actions/workflows/ci.yml)
66
+ [![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
67
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
68
+ [![Coverage](https://codecov.io/gh/xiabai2008/Ruoyi-Scan/branch/main/graph/badge.svg)](https://codecov.io/gh/xiabai2008/Ruoyi-Scan)
69
+ [![Star History](https://api.star-history.com/svg?repos=xiabai2008/ruoyi-scan&type=Date)](https://star-history.com/#xiabai2008/ruoyi-scan&Date)
70
+
71
+ [中文](README.md) | [English](README_EN.md)
72
+
73
+ > 一款合法授权的**若依(RuoYi)专项漏洞扫描器**,插件化架构,三态判定(CONFIRMED / SAFE / UNKNOWN)。
74
+ > 支持批量扫描、多格式报告、WAF 绕过、漏洞利用链、Web API 等企业级特性。
75
+ > ⭐ 如果这个工具对你有帮助,欢迎点个 Star 支持一下,让更多人看到它。
76
+
77
+ ---
78
+
79
+ ## 演示
80
+
81
+ <p align="center">
82
+ <img src="assets/demo-scan.gif" alt="Ruoyi-Scan 演示" width="720" />
83
+ </p>
84
+
85
+ > 上图:对内置若依签名靶场执行综合扫描,实时展示风险分布与漏洞列表。
86
+
87
+ ---
88
+
89
+ ## 文档
90
+
91
+ | 文档 | 说明 |
92
+ |------|------|
93
+ | [用户指南](docs/USAGE.md) | 安装配置、扫描模式、CLI 参数详解 |
94
+ | [插件开发教程](docs/PLUGIN_DEV.md) | PluginBase、三态判定、entry_points 注册 |
95
+ | [API 文档](docs/API.md) | REST 端点、WebSocket 事件、OpenAPI 规范 |
96
+ | [贡献指南](CONTRIBUTING.md) | 开发流程、代码规范、提交约定 |
97
+ | [变更日志](CHANGELOG.md) | 版本历史与变更记录 |
98
+
99
+ ---
100
+
101
+ ## 项目定位
102
+
103
+ - **作者**:XIABAI
104
+ - **版本**:1.2.4
105
+ - **仓库**:https://github.com/xiabai2008/Ruoyi-Scan
106
+ - **技术栈**:Python 3.8+ / requests / FastAPI / Docker
107
+ - **许可**:MIT License
108
+
109
+ ---
110
+
111
+ ## 核心能力
112
+
113
+ | 模块 | 说明 |
114
+ |------|------|
115
+ | `plugins/ruoyi/` | 若依 16 个 POC(文件读取、SQL 注入、RCE、SSTI、未授权等)+ 5 变体识别(Vue3/App/Plus/Cloud-Plus) |
116
+ | `plugins/spring/` | Spring Boot 14 个 POC(Actuator、Gateway、Jolokia、Spring4Shell 等) |
117
+ | `plugins/common/` | 通用漏洞包(.git/.env 泄露、备份文件、CORS、Swagger 等) |
118
+ | 指纹识别 | favicon hash + 特征路径 + 关键字,多 CMS 数据驱动 + 若依变体细分 |
119
+ | 组件版本检测 | fastjson/SpringBoot/Shiro/Nacos/Log4j 版本比对 CVE 映射(`--components`) |
120
+ | 三态判定 | CONFIRMED(确认存在)/ SAFE(确认不存在)/ UNKNOWN(无法判定) |
121
+ | WAF 绕过 | 11 种绕过策略 + 三态判定保护矩阵 + 成功率追踪 |
122
+ | 漏洞利用链 | DAG 拓扑编排 + 条件分支 + 3 条内置链 |
123
+ | nuclei 模板兼容 | 直接执行 nuclei-templates YAML 模板(`--nuclei`,http 协议子集 + 安全白名单) |
124
+ | 插件模板仓库 | 导出/manifest/Ed25519 强制验签/`--plugin-update` 社区分发闭环 |
125
+ | AI POC 生成 | `--ai` 自然语言生成插件(LLM 自验证回灌,无 Key 降级规则模板) |
126
+ | AI 报告解读 | `--ai-report zh\|en` 自动生成漏洞分析与修复优先级 |
127
+ | 批量扫描 | `-f targets.txt` 多目标 + 批量汇总报告 |
128
+ | 报告输出 | HTML(SVG 图表)/ JSON / CSV / PDF / Word / Excel / SARIF + 版本对照表 |
129
+ | Web API | FastAPI REST + WebSocket 实时推送 + Web 控制台 + 权限分级(read/scan/admin)+ 定时扫描 |
130
+ | 并发限速 | ThreadPoolExecutor + 令牌桶(锁外 sleep,无并发退化) |
131
+ | 验证码处理 | 自动探测 / OCR 识别 / 跳过 三模式 |
132
+ | 多版本适配 | RuoYi 4.2 / 4.7 / v5 / v3.9.x 版本感知 POC 过滤 |
133
+ | 端口扫描 | TCP 端口扫描 + 服务识别 + Banner 抓取 |
134
+ | 被动代理 | HTTP/HTTPS 代理,捕获流量自动扫描 |
135
+ | OAST 带外检测 | 自建回调服务器 + 6 种 payload 模板(SSRF/XXE/SQL盲注/RCE盲注/LDAP/命令注入) |
136
+ | 业务逻辑检测 | IDOR / 越权 / 参数篡改 / 竞争条件 4 类检测器 |
137
+ | CVE 同步 | NVD REST API + 24h TTL 缓存 + CWE→OWASP/等保 合规映射 |
138
+ | SIEM 集成 | ECS / CEF / LEEF / JSON 4 格式导出 + Syslog 转发 |
139
+ | 异步引擎 | ThreadPoolExecutor 并发扫描 + aiohttp 可选异步 HTTP |
140
+ | 分布式扫描 | Redis Master-Worker 队列 + Standalone 降级模式 |
141
+ | 结果缓存 | SQLite 持久化 + SHA256 键 + TTL + 命中率统计 |
142
+ | 扫描模板 | quick / deep / compliance / dengbao 4 种预设策略 |
143
+ | 认证扫描 | Cookie / Token / Bearer / 自动登录 4 种认证注入 |
144
+ | 国际化 | 中英文报告切换(`--lang zh|en`) |
145
+ | 插件 SDK | 模板生成 + 验证 + 枚举(`--plugin-init` / `--plugin-check`) |
146
+ | CI/CD 集成 | 严重度阈值退出 + GitHub Code Scanning(SARIF)+ GitLab/Jenkins 模板 |
147
+ | 漏洞知识库 | 离线 HTML Wiki + JSON API |
148
+
149
+ ---
150
+
151
+ ## 快速开始
152
+
153
+ ### 方式一:pip 安装(推荐)
154
+
155
+ ```bash
156
+ # 安装(自动安装核心依赖)
157
+ pip install ruoyi-scan
158
+
159
+ # 可选功能依赖(按需安装)
160
+ pip install pyyaml # --config YAML 配置文件
161
+ pip install redis # --distributed Redis 分布式扫描
162
+ pip install aiohttp # --async 异步 HTTP 客户端
163
+
164
+ # 运行扫描
165
+ ruoyi-scan -p http://target:8080/
166
+ ```
167
+
168
+ ### 方式二:从 Release 下载安装(离线环境)
169
+
170
+ 前往 [Releases 页面](https://github.com/xiabai2008/Ruoyi-Scan/releases) 下载最新 `.whl` 文件,然后:
171
+
172
+ ```bash
173
+ pip install ruoyi_scan-1.2.4-py3-none-any.whl
174
+ ```
175
+
176
+ ### 方式三:源码安装
177
+
178
+ ```bash
179
+ git clone https://github.com/xiabai2008/Ruoyi-Scan.git
180
+ cd Ruoyi-Scan
181
+ pip install -r requirements.txt
182
+
183
+ # 单目标漏洞扫描
184
+ python main.py -p http://target:8080/
185
+
186
+ # 批量扫描
187
+ python main.py -f targets.txt -p --report ./reports
188
+
189
+ # 手动指定 CMS(跳过指纹识别)
190
+ python main.py -p http://target:8080/ --cms ruoyi
191
+
192
+ # 综合扫描(目录扫描 + 漏洞检测 + 登录爆破)
193
+ python main.py -u http://target:8080/
194
+
195
+ # 生成全格式报告(HTML/JSON/CSV/PDF/Word/Excel)
196
+ python main.py -p http://target:8080/ --report ./reports --report-format all
197
+
198
+ # WAF 绕过(检测到 WAF 自动启用)
199
+ python main.py -p http://target:8080/ --bypass-waf auto
200
+
201
+ # 执行漏洞利用链
202
+ python main.py --chain ruoyi_sql_to_rce -u http://target:8080/
203
+ python main.py --chain list # 列出可用链
204
+
205
+ # 组件版本检测(fastjson/SpringBoot/Shiro/Nacos/Log4j → CVE 比对)
206
+ python main.py -p http://target:8080/ --components
207
+
208
+ # 执行 nuclei 模板(nuclei-templates 生态直接复用)
209
+ python main.py -p http://target:8080/ --nuclei examples/nuclei/
210
+ python main.py --nuclei-validate examples/nuclei/ # 模板校验(不扫描)
211
+
212
+ # AI 生成插件(LLM 自验证回灌;无 Key 时降级规则模板)
213
+ python main.py --ai "检测若依任意文件读取漏洞" --category ruoyi
214
+
215
+ # 插件模板仓库(社区分发)
216
+ python main.py --plugin-export ./ruoyi-scan-templates
217
+ python main.py --plugin-manifest ./ruoyi-scan-templates # 生成/校验 manifest(Ed25519 签名)
218
+ python main.py --plugin-update # 从官方仓库更新插件
219
+
220
+ # Web API 服务
221
+ python main.py --serve
222
+ # 访问 http://localhost:8000/ (Web 控制台)
223
+ # 访问 http://localhost:8000/docs (OpenAPI 文档)
224
+
225
+ # 端口扫描 + 漏洞检测
226
+ python main.py -p http://target:8080/ --portscan
227
+
228
+ # 被动代理模式
229
+ python main.py --passive --passive-port 8080
230
+
231
+ # Docker 部署(见下方「Docker 部署」章节)
232
+ # docker-compose up -d
233
+ ```
234
+
235
+ ### Docker 部署
236
+
237
+ Ruoyi-Scan 提供生产就绪的 Docker 镜像(多阶段构建、非 root 用户)。
238
+
239
+ **构建镜像**
240
+
241
+ ```bash
242
+ docker build -t ruoyi-scan .
243
+ ```
244
+
245
+ **扫描目标**
246
+
247
+ ```bash
248
+ # 基本扫描
249
+ docker run --rm ruoyi-scan -p http://target/
250
+
251
+ # 扫描并保存报告到宿主机
252
+ docker run --rm -v $(pwd)/reports:/app/reports ruoyi-scan \
253
+ -p http://target/ --report /app/reports
254
+ ```
255
+
256
+ **Web API 服务**
257
+
258
+ ```bash
259
+ # 启动 FastAPI Web API(端口 8000)
260
+ docker run --rm -p 8000:8000 ruoyi-scan --serve --host 0.0.0.0 --port 8000
261
+
262
+ # 带认证的 API
263
+ docker run --rm -p 8000:8000 -e RUOYI_SCAN_API_KEY=your-secret ruoyi-scan \
264
+ --serve --host 0.0.0.0 --port 8000 --api-key your-secret
265
+ ```
266
+
267
+ **Docker Compose 一键部署**
268
+
269
+ ```bash
270
+ # 启动全部服务(扫描器 + API + 2 个签名靶场)
271
+ docker compose up -d
272
+
273
+ # 扫描内置靶场
274
+ docker compose run --rm scanner -p http://lab-ruoyi:8080/ --report /app/reports
275
+
276
+ # 启动监控栈(Prometheus + Grafana)
277
+ docker compose --profile monitor up -d
278
+ # Grafana: http://localhost:3000 (admin/admin)
279
+ # Prometheus: http://localhost:9090
280
+
281
+ # 清理
282
+ docker compose down
283
+ ```
284
+
285
+ | 服务 | 端口 | 说明 |
286
+ |------|------|------|
287
+ | scanner | - | 扫描器 CLI(通过 `docker compose run` 调用) |
288
+ | api | 8000 | FastAPI Web API + WebSocket + Web 控制台 |
289
+ | lab-ruoyi | 8080 | 若依签名靶场(vuln 模式) |
290
+ | lab-spring | 8091 | Spring Boot 签名靶场(vuln 模式) |
291
+ | prometheus | 9090 | 指标采集(`--profile monitor`) |
292
+ | grafana | 3000 | 监控面板(`--profile monitor`) |
293
+
294
+ ### CLI 参数速查
295
+
296
+ > 完整参数说明请运行 `python main.py -h`。以下按功能分组列出全部参数。
297
+
298
+ #### 核心扫描模式
299
+
300
+ | 参数 | 说明 |
301
+ |------|------|
302
+ | `-h` | 帮助信息 |
303
+ | `-u <url>` | 综合扫描(目录+漏洞+爆破) |
304
+ | `-m <url>` | 目录扫描 |
305
+ | `-p <url>` | 漏洞检测 |
306
+ | `-l <url>` | 登录爆破 |
307
+ | `-f <file>` | 批量扫描(从文件读取目标列表) |
308
+ | `--cms <ruoyi\|spring>` | 手动指定 CMS(跳过指纹识别) |
309
+ | `--pass-level <lvl>` | 口令字典级别 top100/top1000/full |
310
+ | `--template <name>` | 扫描模板(quick/deep/compliance/dengbao) |
311
+ | `--template-list` | 列出所有可用模板 |
312
+ | `--config <path>` | YAML 配置文件(CLI 参数优先级高于配置) |
313
+
314
+ #### 网络与并发
315
+
316
+ | 参数 | 说明 |
317
+ |------|------|
318
+ | `--proxy <url>` | 代理地址(如 http://127.0.0.1:8080) |
319
+ | `--proxy-file <f>` | 代理池文件(每行一个代理 URL) |
320
+ | `--proxy-rotate <s>` | 代理轮换策略 round-robin/random/least-fail |
321
+ | `--threads <n>` | 并发线程数 |
322
+ | `--rate <n>` | 每秒请求数(0=不限速) |
323
+ | `--timeout <n>` | 请求超时秒数 |
324
+ | `--debug` | 调试模式(请求日志输出到 stderr) |
325
+
326
+ #### 信息收集(D14)
327
+
328
+ | 参数 | 说明 |
329
+ |------|------|
330
+ | `--crawl` | 启用主动爬虫 |
331
+ | `--crawl-depth <n>` | 爬虫最大深度(默认 2) |
332
+ | `--crawl-max-pages <n>` | 爬虫最大页面数(默认 50) |
333
+ | `--subdomain` | 启用子域名枚举 |
334
+ | `--js-extract` | 启用 JS 端点提取 |
335
+ | `--portscan` | 端口扫描 + 服务识别 |
336
+ | `--ports <p1,p2>` | 自定义端口列表(逗号分隔) |
337
+ | `--passive` | 启动被动代理模式 |
338
+ | `--passive-host <addr>` | 代理监听地址(默认 127.0.0.1) |
339
+ | `--passive-port <n>` | 代理监听端口(默认 8080) |
340
+
341
+ #### 报告与输出
342
+
343
+ | 参数 | 说明 |
344
+ |------|------|
345
+ | `--report <dir>` | 报告输出目录 |
346
+ | `--report-format <f>` | 报告格式 html/json/csv/pdf/docx/xlsx/sarif |
347
+ | `--no-dedup` | 关闭结果去重聚合 |
348
+ | `--lang <zh\|en>` | 报告语言(默认 zh) |
349
+ | `--diff <old.json>` | 与历史扫描报告对比 |
350
+ | `--diff-only <old> <new>` | 仅对比两个 JSON 报告 |
351
+ | `--save-baseline` | 保存本次扫描结果为基线 |
352
+
353
+ #### WAF 绕过与利用链
354
+
355
+ | 参数 | 说明 |
356
+ |------|------|
357
+ | `--bypass-waf <auto\|on\|off>` | WAF 绕过策略(默认 auto) |
358
+ | `--chain <name>` | 执行漏洞利用链 |
359
+ | `--chain-list` | 列出所有可用的漏洞利用链 |
360
+
361
+ #### 认证扫描(D26)
362
+
363
+ | 参数 | 说明 |
364
+ |------|------|
365
+ | `--auth <type=value>` | 认证注入(可多次指定) |
366
+ | `--auth-file <path>` | 从文件加载认证信息 |
367
+ | `--auth-login <user:pass>` | 自动登录获取认证 |
368
+
369
+ #### Web API 服务(D9/D11)
370
+
371
+ | 参数 | 说明 |
372
+ |------|------|
373
+ | `--serve` | 启动 Web API 服务(FastAPI + WebSocket + Web 控制台) |
374
+ | `--host <addr>` | API 服务监听地址(默认 0.0.0.0) |
375
+ | `--port <n>` | API 服务监听端口(默认 8000) |
376
+ | `--api-key <key>` | API Key 鉴权 |
377
+ | `--cors-origins <o>` | 允许的 CORS 源(逗号分隔) |
378
+ | `--db-path <path>` | SQLite 任务持久化数据库路径 |
379
+
380
+ > 详细的 API 端点说明、请求/响应示例、WebSocket 事件格式请参考 [API 使用指南](docs/API.md)。
381
+ > OpenAPI 3.0 规范可通过 `python scripts/export_openapi.py` 导出至 `docs/openapi.json`。
382
+
383
+ #### OAST 带外检测(D30)
384
+
385
+ | 参数 | 说明 |
386
+ |------|------|
387
+ | `--oast` | 启用 OAST 带外检测 |
388
+ | `--oast-server` | 启动 OAST 回调服务器 |
389
+ | `--oast-host <addr>` | OAST 服务器监听地址 |
390
+ | `--oast-port <n>` | OAST 服务器监听端口 |
391
+
392
+ #### 业务逻辑检测(D31)
393
+
394
+ | 参数 | 说明 |
395
+ |------|------|
396
+ | `--logic-scan` | 业务逻辑漏洞检测(IDOR/越权/参数篡改/竞争条件) |
397
+ | `--logic-endpoints <file>` | 业务扫描端点列表文件 |
398
+ | `--logic-concurrency <n>` | 竞争条件检测并发数 |
399
+
400
+ #### CVE 同步(D32)
401
+
402
+ | 参数 | 说明 |
403
+ |------|------|
404
+ | `--cve-sync` | 同步 NVD CVE 信息 |
405
+ | `--cve-id <CVE-ID>` | 查询单个 CVE 信息 |
406
+ | `--nvd-api-key <key>` | NVD API Key(提高速率限制) |
407
+
408
+ #### SIEM 集成(D33)
409
+
410
+ | 参数 | 说明 |
411
+ |------|------|
412
+ | `--siem-export <fmt>` | 导出 SIEM 格式(ecs/cef/leef/json) |
413
+ | `--siem-output <path>` | SIEM 导出路径 |
414
+ | `--siem-syslog <host:port>` | 发送到 Syslog 服务器 |
415
+ | `--siem-protocol <p>` | Syslog 协议 udp/tcp |
416
+
417
+ #### 异步引擎(D34)
418
+
419
+ | 参数 | 说明 |
420
+ |------|------|
421
+ | `--async` | 启用异步扫描引擎(ThreadPoolExecutor) |
422
+ | `--async-workers <n>` | 异步并发线程数(默认 10) |
423
+
424
+ #### Web UI 控制台(D35)
425
+
426
+ | 参数 | 说明 |
427
+ |------|------|
428
+ | `--web-ui` | 生成 Web UI 控制台(单页 HTML) |
429
+ | `--web-ui-output <path>` | Web UI 输出路径 |
430
+ | `--web-ui-api <url>` | Web UI 连接的 API 地址 |
431
+
432
+ #### 分布式扫描(D36)
433
+
434
+ | 参数 | 说明 |
435
+ |------|------|
436
+ | `--distributed <mode>` | 分布式模式(master/worker/standalone) |
437
+ | `--redis-url <url>` | Redis 连接 URL |
438
+ | `--distributed-rate <n>` | 分布式全局限速(每秒请求数,0 不限速) |
439
+ | `--worker-max-tasks <n>` | Worker 最大任务数(0 不限) |
440
+ | `--distributed-timeout <n>` | 分布式超时秒数(默认 600) |
441
+
442
+ #### 结果缓存(D37)
443
+
444
+ | 参数 | 说明 |
445
+ |------|------|
446
+ | `--cache` | 启用扫描结果缓存(SQLite) |
447
+ | `--cache-ttl <n>` | 缓存有效期秒数(默认 3600) |
448
+ | `--cache-db <path>` | 缓存数据库路径 |
449
+ | `--cache-stats` | 查看缓存统计 |
450
+ | `--cache-clear` | 清除过期缓存 |
451
+ | `--cache-clear-all` | 清除全部缓存 |
452
+
453
+ #### 通知(D21)
454
+
455
+ | 参数 | 说明 |
456
+ |------|------|
457
+ | `--notify <type=target>` | 扫描完成通知(可多次指定) |
458
+
459
+ #### 插件 SDK(D25)
460
+
461
+ | 参数 | 说明 |
462
+ |------|------|
463
+ | `--plugin-init <name>` | 生成插件模板 |
464
+ | `--plugin-check <path>` | 验证插件文件完整性 |
465
+ | `--plugin-list` | 列出所有已加载插件 |
466
+ | `--category <cat>` | 插件类别 ruoyi/spring/common |
467
+
468
+ #### CI/CD 集成(D28)
469
+
470
+ | 参数 | 说明 |
471
+ |------|------|
472
+ | `--ci` | CI 模式(严重度超阈值时退出码非 0) |
473
+ | `--severity-threshold <lvl>` | CI 失败阈值 low/medium/high(默认 high) |
474
+ | `--ci-init <platform>` | 生成 CI 配置(github/gitlab/jenkins) |
475
+
476
+ #### 漏洞知识库(D29)
477
+
478
+ | 参数 | 说明 |
479
+ |------|------|
480
+ | `--wiki` | 生成漏洞知识库(HTML Wiki + JSON API) |
481
+ | `--wiki-output <path>` | 知识库输出路径 |
482
+
483
+ ---
484
+
485
+ ## 扫描模式速览
486
+
487
+ 核心命令只有两个:`-p`(单目标漏洞扫描)和 `-u`(综合扫描)。两者区别:
488
+
489
+ | 对比项 | `-p` 单目标漏洞扫描 | `-u` 综合扫描 |
490
+ |--------|----------------------|----------------|
491
+ | 执行内容 | 仅执行 `vuln` 类插件(RCE、文件读取、越权、信息泄露等漏洞判定) | 全流程依次执行:`recon` 信息收集(目录扫描、目录列表探测)→ `vuln` 漏洞检测 → `brute` 弱口令爆破(Druid、默认口令等) |
492
+ | 特点 | 速度快、请求量小,单点漏洞确认 | 完整风险评估,耗时较长 |
493
+ | 适合场景 | 已知目标,只想快速确认是否存在漏洞 | 需要对目标做一次全面评估 |
494
+
495
+ ```bash
496
+ # 仅快速确认漏洞(单目标)
497
+ python main.py -p http://target:8080/
498
+
499
+ # 完整评估(目录 + 漏洞 + 爆破)
500
+ python main.py -u http://target:8080/
501
+ ```
502
+
503
+ > 仍不清楚该选哪种?可参考 [issue #1 的讨论](https://github.com/xiabai2008/ruoyi-scan/issues/1)(两种模式的区别详解)。
504
+
505
+ ---
506
+
507
+ ## 目录结构
508
+
509
+ ```
510
+ Ruoyi-Scan/
511
+ ├── main.py # CLI 入口(~390 行,纯参数解析+分发)
512
+ ├── config/settings.py # 全局配置
513
+ ├── core/ # 核心引擎层
514
+ │ ├── runner.py # 扫描编排器(P0 拆分)
515
+ │ ├── engine.py # 并发编排+令牌桶限速
516
+ │ ├── models.py # 数据模型(三态判定)
517
+ │ ├── loader.py # 插件动态发现
518
+ │ ├── fingerprint.py # 指纹识别
519
+ │ ├── router.py # 指纹→插件路由
520
+ │ ├── session.py # 会话封装
521
+ │ ├── chain.py # 漏洞利用链引擎
522
+ │ ├── report.py # 报告渲染(HTML/JSON/CSV)
523
+ │ └── ... # 更多核心模块
524
+ ├── plugins/ # 插件系统
525
+ │ ├── base.py # PluginBase 抽象基类
526
+ │ ├── ruoyi/ # 若依 16 个 POC
527
+ │ ├── spring/ # Spring 14 个 POC
528
+ │ ├── common/ # 通用 8 个 POC
529
+ │ └── chain/ # 3 条利用链
530
+ ├── lib/ # 工具库(31 个模块)
531
+ ├── api/ # Web API(FastAPI + WebSocket)
532
+ ├── data/ # 字典文件
533
+ ├── tests/ # 38 个测试文件 / 887 条用例
534
+ ├── lab/ # 靶场环境
535
+ ├── web/ # Web 控制台前端
536
+ ├── monitoring/ # Grafana + Prometheus
537
+ ├── .github/workflows/ # CI 配置
538
+ ├── Dockerfile # Docker 镜像
539
+ ├── docker-compose.yml # Docker 编排
540
+ ├── LICENSE # MIT License
541
+ └── requirements.txt # 依赖管理
542
+ ```
543
+
544
+ ---
545
+
546
+ ## 测试
547
+
548
+ ```bash
549
+ # 全量测试
550
+ python -m pytest tests/ -q
551
+
552
+ # 若依插件回归
553
+ python tests/regression_ruoyi.py
554
+
555
+ # Spring 插件回归
556
+ python tests/regression_spring.py
557
+ ```
558
+
559
+ ---
560
+
561
+ ## 贡献
562
+
563
+ 欢迎贡献 POC 与改进:
564
+
565
+ - **报告 Bug / 请求 POC**:使用 [Issue 模板](https://github.com/xiabai2008/Ruoyi-Scan/issues/new/choose)(Bug / POC 请求 / 功能请求)
566
+ - **提交 POC**:`python main.py --plugin-init <name>` 生成骨架 → 实现 `verify()`(三态判定)→ `--plugin-check` 验证 → PR(模板含完整 checklist)
567
+ - **插件分发**:合入后自动进入 [ruoyi-scan-templates](https://github.com/xiabai2008/ruoyi-scan-templates) 官方仓库(Ed25519 签名)
568
+ - **开发指南**:[docs/PLUGIN_DEV.md](docs/PLUGIN_DEV.md) / [CONTRIBUTING.md](CONTRIBUTING.md)
569
+
570
+ > 贡献 POC 前请先在自建靶场(`lab/`)或授权目标上复现,确保判定特征真实可靠。
571
+
572
+ ---
573
+
574
+ ## 安全与合规
575
+
576
+ 本工具仅用于**授权范围内**的安全测试与学习研究。不得用于未授权目标。涉及利用的插件默认仅做存在性验证,不做实际破坏。
577
+
578
+ ---
579
+
580
+ ## License
581
+
582
+ MIT License © 2026 XIABAI