Skip to content

Commit fb3c6e2

Browse files
committed
docs: 新增「项目」栏目,介绍组织全部 18 个公开仓库
- docs/projects/:13 个页面 - index.md:按方向分组的总览 + 自动同步的公开仓库清单表 - 服务端/客户端:fyserver、kards-server-go、FyClient - UE 工具链:Prism、UAssetRegistry、AssetRegistryTool、ULocres、 KismetDecompiler、KismetReactor - 逆向/协议:B64XorDecryption - upstream.md:7 个 Fork 项目逐项说明(含上游归属声明) - site.md:本站仓库结构与部署流程 - scripts/sync-projects.mjs + npm run sync:从 GitHub 同步公开仓库清单, 重写 index.md 中的标记区块,并提示缺少介绍页的仓库 - .vitepress/config.mjs:导航新增「项目」,侧边栏按方向分组 - docs/index.md:改为 hero + features 首页,附快速入口与仓库索引 内容整理自各仓库 README / 源码,私有仓库不在站点展开。
1 parent aeaba2c commit fb3c6e2

17 files changed

Lines changed: 1334 additions & 14 deletions

.vitepress/config.mjs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,46 @@ export default defineConfig({
1010
themeConfig: {
1111
nav: [
1212
{ text: '首页', link: '/' },
13+
{ text: '项目', link: '/projects/', activeMatch: '^/projects/' },
1314
{ text: '安全 QA', link: '/security/', activeMatch: '^/security/' },
1415
],
1516
sidebar: {
17+
'/projects/': [
18+
{
19+
text: '项目总览',
20+
items: [{ text: '全部公开项目', link: '/projects/' }],
21+
},
22+
{
23+
text: '游戏服务端与客户端',
24+
items: [
25+
{ text: 'fyserver', link: '/projects/fyserver' },
26+
{ text: 'kards-server-go', link: '/projects/kards-server-go' },
27+
{ text: 'FyClient', link: '/projects/fyclient' },
28+
],
29+
},
30+
{
31+
text: 'UE 资产与蓝图工具链',
32+
items: [
33+
{ text: 'Prism', link: '/projects/prism' },
34+
{ text: 'UAssetRegistry', link: '/projects/uassetregistry' },
35+
{ text: 'AssetRegistryTool', link: '/projects/assetregistrytool' },
36+
{ text: 'ULocres', link: '/projects/ulocres' },
37+
{ text: 'KismetDecompiler', link: '/projects/kismetdecompiler' },
38+
{ text: 'KismetReactor', link: '/projects/kismetreactor' },
39+
],
40+
},
41+
{
42+
text: '逆向工程与协议分析',
43+
items: [{ text: 'B64XorDecryption', link: '/projects/b64xordecryption' }],
44+
},
45+
{
46+
text: '其它',
47+
items: [
48+
{ text: '上游衍生项目(Fork)', link: '/projects/upstream' },
49+
{ text: '本站(CCB-Team.github.io)', link: '/projects/site' },
50+
],
51+
},
52+
],
1653
'/security/': [
1754
{
1855
text: '安全 QA',
@@ -24,6 +61,10 @@ export default defineConfig({
2461
{ text: '镜像与回放工具', link: '/security/tooling' },
2562
],
2663
},
64+
{
65+
text: '相关',
66+
items: [{ text: '项目总览', link: '/projects/' }],
67+
},
2768
],
2869
},
2970
outline: { level: [2, 3], label: '本页目录' },

docs/index.md

Lines changed: 58 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,64 @@
1-
# CCB-TEAM
1+
---
2+
layout: home
23

3-
CCB-TEAM 组织站点。这里放团队项目的文档与测试记录。
4+
hero:
5+
name: CCB-TEAM
6+
text: 组织站点
7+
tagline: 团队项目的文档、工具与研究记录
8+
actions:
9+
- theme: brand
10+
text: 浏览全部项目
11+
link: /projects/
12+
- theme: alt
13+
text: 安全 QA 记录
14+
link: /security/
415

5-
## 已有内容
16+
features:
17+
- title: 游戏服务端与客户端
18+
details: fyserver(C# / .NET 10)与 kards-server-go(Go / Gin)两套 KARDS 服务端实现,以及端到端验证客户端 FyClient。
19+
link: /projects/fyserver
20+
linkText: 3 个项目
21+
- title: UE .pak 工具箱
22+
details: Prism 支持浏览与预览、贴图替换、pak 合并,以及在游戏的 PC 与移动端构建之间移植贴图。
23+
link: /projects/prism
24+
linkText: 了解 Prism
25+
- title: 资产与本地化格式
26+
details: AssetRegistry.bin 的解析与语义级回写、UE 5.6 编辑器插件,以及四种格式版本的 .locres 读写。
27+
link: /projects/uassetregistry
28+
linkText: 了解 UAssetRegistry
29+
- title: 蓝图字节码工具
30+
details: KismetDecompiler 把蓝图字节码输出为结构化伪代码,KismetReactor 提供图形化查看与就地编辑。
31+
link: /projects/kismetdecompiler
32+
linkText: 了解 KismetDecompiler
33+
- title: 协议逆向
34+
details: B64XorDecryption 还原「Base64 + 变长 XOR 密钥」私有协议,附 C 动态库、C# API 与 IDA 伪代码存档。
35+
link: /projects/b64xordecryption
36+
linkText: 了解编解码方案
37+
- title: 安全 QA 记录
38+
details: 对 Kards 后台的一轮功能 QA 与安全测试:结论、方法、可复现步骤,以及离线复现的工具链。
39+
link: /security/
40+
linkText: 查看测试记录
41+
---
642

7-
- **[安全 QA](/security/)** —— Kards 后台的功能 QA 与安全测试记录:
8-
- [测试方法](/security/methodology):通道、流程、复现命令、踩过的坑
9-
- [上传与目录穿越](/security/upload-and-traversal):任意文件上传(High)、目录穿越(未成立)及低危问题
10-
- [功能缺陷清单](/security/functional-defects):28 条可复现缺陷与修复建议
11-
- [镜像与回放工具](/security/tooling):站点镜像 + 本地回放服务(含写侧 mock)
43+
## 快速入口
1244

13-
## 相关仓库
14-
15-
| 仓库 | 说明 |
45+
| 方向 | 内容 |
1646
|---|---|
17-
| [kards-admin-qa](https://github.com/CCB-TEAM/kards-admin-qa) | 上述测试的完整产物:镜像、回放服务源码、测试脚本、证据与报告(私有) |
47+
| 项目总览 | [全部公开项目](/projects/) —— 按方向分组的完整清单(含自动同步的仓库状态表) |
48+
| 游戏服务端 | [fyserver](/projects/fyserver) · [kards-server-go](/projects/kards-server-go) · [FyClient](/projects/fyclient) |
49+
| UE 工具链 | [Prism](/projects/prism) · [UAssetRegistry](/projects/uassetregistry) · [AssetRegistryTool](/projects/assetregistrytool) · [ULocres](/projects/ulocres) · [KismetDecompiler](/projects/kismetdecompiler) · [KismetReactor](/projects/kismetreactor) |
50+
| 逆向与协议 | [B64XorDecryption](/projects/b64xordecryption) · [上游衍生项目](/projects/upstream) |
51+
| 测试记录 | [安全 QA](/security/) —— 测试方法、上传与目录穿越、功能缺陷清单、镜像与回放工具 |
52+
| 本站 | [CCB-Team.github.io](/projects/site) —— VitePress 站点源码与部署流程 |
53+
54+
## 组织仓库
55+
56+
所有公开仓库都在 [github.com/CCB-TEAM](https://github.com/CCB-TEAM)
57+
站点内的项目清单由脚本从 GitHub 同步,运行 `npm run sync` 即可更新:
1858

19-
<!-- 占位首页,后续在此补充更多团队项目与文档 -->
59+
```bash
60+
npm ci # 安装依赖
61+
npm run dev # 本地预览
62+
npm run sync # 刷新项目总览中的公开仓库清单
63+
npm run build # 构建静态站点到 .vitepress/dist
64+
```

docs/projects/assetregistrytool.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: AssetRegistryTool —— UE5.6 资产注册表插件
3+
---
4+
5+
# AssetRegistryTool
6+
7+
UE 5.6.1 编辑器插件:**从已有资产注册表 + 当前工程内的资产,构建一份新的 `AssetRegistry.bin`**
8+
服务于 cooked 游戏改包场景——需要把新增或替换的资产登记进原版注册表时,不必手写二进制。
9+
10+
|||
11+
|---|---|
12+
| 语言 / 引擎 | C++ · Unreal Engine 5.6.1 编辑器插件 |
13+
| 形态 | 编辑器菜单工具 + commandlet(兼容旧流程) |
14+
| 仓库 | <https://github.com/CCB-TEAM/AssetRegistryTool> |
15+
16+
## 编辑器用法
17+
18+
1. 把插件目录拷到 `YourProject/Plugins/AssetRegistryTool`,或作为引擎 / 工程插件保留。
19+
2. 启用插件,按 Unreal 提示重新编译工程。
20+
3. 打开编辑器菜单 `Tools > Asset Registry Tool`
21+
4. 选择基础 `AssetRegistry.bin`
22+
5. 选择生成注册表的输出路径。
23+
6. 在 Content Browser 里选中资产后点 `Generate From Selected Assets`,或点 `Generate From All / Game Assets`
24+
25+
生成结果 = 基础注册表 + 选中的工程资产。**覆盖开关**决定工程资产是否替换基础注册表中同 object path 的已有条目。
26+
27+
## Commandlet 用法
28+
29+
旧版 commandlet 流程仍保留以兼容既有脚本:
30+
31+
```powershell
32+
# 列出注册表内容
33+
UnrealEditor-Cmd.exe "X:/Project/Project.uproject" -run=AssetRegistryTool List \
34+
-AssetRegistry="X:/AssetRegistry.bin" -OutFile="X:/AssetRegistry.json"
35+
36+
# 合并两份注册表
37+
UnrealEditor-Cmd.exe "X:/Project/Project.uproject" -run=AssetRegistryTool Merge \
38+
-HostAssetRegistry="X:/Host/AssetRegistry.bin" \
39+
-AssetRegistry="X:/Donor/AssetRegistry.bin" \
40+
-OutputAssetRegistry="X:/Out/AssetRegistry.bin" \
41+
-FilterPaths="/Game/L10N" -OverwriteExistingAssets
42+
```
43+
44+
## 注意事项
45+
46+
- 编辑器工具读取的是**当前 UE 工程可见**的资产注册表,导出前请先保存并刷新资产。
47+
- 用于 cooked 游戏改包时,**必须在目标游戏中实测**生成的 `AssetRegistry.bin`:部分游戏依赖 cooked 包元数据或自定义加载行为,这些无法仅从编辑器资产推断出来。
48+
49+
## 相关项目
50+
51+
- [UAssetRegistry](/projects/uassetregistry) —— 脱离引擎、纯 .NET 读写同一格式的库,适合做批量处理与自动化

docs/projects/b64xordecryption.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: B64XorDecryption —— Base64+XOR 协议编解码
3+
---
4+
5+
# B64XorDecryption
6+
7+
对某客户端**私有协议编码方案**的逆向成果与可复用实现:从二进制中还原出「Base64 + 变长 XOR 密钥」的编解码算法,
8+
并提供 **C 动态库****C# API****IDA 伪代码存档**三份材料。
9+
10+
|||
11+
|---|---|
12+
| 语言 | C(`codec.c`)· C#(`Class1.cs`)· IDA 伪代码存档 |
13+
| 许可 | AGPL-3.0(仓库内 `LICENSE.txt`|
14+
| 仓库 | <https://github.com/CCB-TEAM/B64XorDecryption> |
15+
| 备注 | 仓库无 README,以下整理自源码 |
16+
17+
## 编码格式
18+
19+
报文是一个自描述的字符串,字段拼接顺序如下:
20+
21+
```
22+
[2 位十进制 表索引][6 位十进制 数据长度][4 字符 Base64 actionId][keyLength 字符密钥][Base64 密文]
23+
↑ ↑
24+
查 SALT_LENGTH_TABLE 得到 keyLength 变长,长度由表决定
25+
```
26+
27+
解码步骤(`Class1.cs``DataDecoder.Decode`):
28+
29+
1. 取前 2 位十进制数字作为 `tableIndex`,前 8 位之后的 6 位十进制数字作为 `dataLength`
30+
2.`tableIndex`**75 元素**`SALT_LENGTH_TABLE` 得到 `keyLength`
31+
3. 从第 8 位起取 4 字符 Base64 作为 **actionId**,随后取 `keyLength` 个 ASCII 字符作为**密钥**,剩余部分为 Base64 密文。
32+
4. 密文与密钥**按位循环 XOR** 得到明文;actionId 三个字节也用密钥对应字节 XOR 后拼成 24 位整数。
33+
34+
```csharp
35+
var r = DataDecoder.Decode(encoded);
36+
// r.TableIndex / r.KeyLength / r.DataLength / r.ActionId / r.Key / r.Plaintext
37+
DataDecoder.setSaltLengthTable(newTable); // 必须正好 75 个元素,否则抛异常
38+
```
39+
40+
## 仓库内容
41+
42+
| 文件 | 说明 |
43+
|---|---|
44+
| `codec.c` | 完整 C 实现:Base64 编解码、75 元素密钥长度表、`ensure_init()` 惰性初始化,Windows 下以 `__declspec(dllexport)` 导出 |
45+
| `Class1.cs` | C# 侧 `DataDecoder` / `DecodeResult`,含可替换的盐长表与结构化解码结果 |
46+
| `破解加密易如反掌.cpp` | 从二进制中还原算法时的 **IDA 伪代码存档**:盐长表内存地址与元素个数(`0x4B` = 75)、字符集常量、action 回调函数还原过程 |
47+
| `B64XorDecryptionApi.csproj` / `.slnx` | C# 项目与解决方案文件 |
48+
49+
C 侧的导出入口刻意使用了混淆命名(`_xR7qM2vP` 编码、`_kW3nJ9tF` 解码),
50+
并保留了 `verify_caller()` 调用者校验钩子(当前实现为占位,恒返回 1),方便按需接入宿主校验。
51+
52+
## 用途
53+
54+
- 解析 / 伪造该协议的请求与响应,用于协议分析、本地回放与测试工具开发。
55+
- 作为 [fyserver](/projects/fyserver) / [FyClient](/projects/fyclient) 编解码层的算法参考来源(同源的 Base64 + XOR + 查表密钥方案)。
56+
57+
::: warning 合规提示
58+
本项目为逆向工程研究产物。请仅在你拥有或获授权测试的环境中使用,并自行确认当地法律、软件许可与平台规则。
59+
:::

docs/projects/fyclient.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: FyClient —— 私服端到端测试客户端
3+
---
4+
5+
# FyClient
6+
7+
配合 [fyserver](/projects/fyserver) 使用的**虚拟测试客户端**:用纯 C# 模拟游戏客户端协议,
8+
把登录 → 卡组 → 匹配 → 对局动作 → 调度换牌 → 轮询 → 胜负判定 → WebSocket 心跳整条链路跑通,
9+
用来对服务端做端到端验证,而不必每次开真实游戏客户端。
10+
11+
|||
12+
|---|---|
13+
| 语言 / 运行时 | C# · .NET 10 |
14+
| 依赖 | 无原生 DLL;请求体序列化走源生成上下文(`FyClientJsonContext`),NativeAOT 友好 |
15+
| 仓库 | <https://github.com/CCB-TEAM/FyClient> |
16+
17+
## 特性
18+
19+
- **纯 C# 协议实现**:编解码(Base64 + XOR、查表密钥、3 字节 actionId)为托管实现,与服务器 `CodecService` 同源。
20+
- **零反射**:请求体通过 System.Text.Json 源生成序列化,可在 AOT 下运行。
21+
- **五个命令**`login` / `solo` / `duel` / `ws` / `decode`
22+
23+
## 快速开始
24+
25+
```bash
26+
# 先启动服务器(fyserver)
27+
dotnet build
28+
29+
# 登录 / 注册(自动创建卡组),打印 player_id 与 jwt
30+
dotnet run -- login 用户名
31+
32+
# 单人对局全流程:匹配 → 调度 → 出牌 → 结束对局 → 胜负判定
33+
dotnet run -- solo 用户名
34+
35+
# 双人对局:两个玩家经 battle_code 匹配后自动对打
36+
dotnet run -- duel 用户A 用户B
37+
38+
# WebSocket 心跳(验证 codec 认证头解析)
39+
dotnet run -- ws 用户名
40+
41+
# 解码协议串(调试用)
42+
dotnet run -- decode "编码串"
43+
```
44+
45+
| 选项 | 默认值 | 说明 |
46+
|---|---|---|
47+
| `--server` | `http://127.0.0.1:1145` | 服务器 HTTP 地址 |
48+
| `--ws` | `9178` | 服务器 WebSocket 端口 |
49+
50+
## 双人对局输出示例
51+
52+
```
53+
[玩家甲] 登录成功 player_id=566870 name=XDLG#6865
54+
[玩家甲] 已加入匹配(extraData=battle_code:fyduel_374945)
55+
[玩家乙] 对局 848112 status=pending match_type=code
56+
双方就绪,对局 848112 开始
57+
[玩家乙] 轮询到动作: 4 条
58+
[玩家甲] 对局结束 faction=Germany winner=True
59+
[玩家乙] 对局结束 faction=Germany winner=False
60+
双人演练完成 ✔
61+
```
62+
63+
## 结构
64+
65+
```
66+
FyClient/
67+
├── Program.cs # 命令分发与场景编排(login/solo/duel/ws/decode)
68+
├── Player.cs # 单玩家客户端:HTTP + WebSocket 全部协议调用
69+
├── Protocol.cs # 协议 DTO 与源生成上下文(FyClientJsonContext)
70+
└── Codec.cs # 编解码纯 C# 实现(与服务器 CodecService 同源)
71+
```
72+
73+
## 协议要点
74+
75+
- 请求体 JSON 使用 `snake_case` 命名,与服务器 `FyJsonContext` 对齐。
76+
- 对局动作经编解码后以 JSON 字段 `a` 承载编码串,提交到 `/matches/v2/{id}/actions`
77+
- WebSocket 认证头为 `codec.Encode(用户名)`**不带** `JWT ` 前缀)。

0 commit comments

Comments
 (0)