# ilspy-cli：面向 Agent 的定向 .NET 反编译

> 通过进程内托管的 ILSpy C# 桥接层，提供程序集、类型和指定方法的反编译、源码搜索及结构化 JSON 输出的 Rust CLI；独立的 PE 头检测器无需加载 .NET 运行时即可识别托管程序集。

- 类型：工具
- 目标：应用
- 类别：.NET 工具
- 关联：基础工具
- 来源复核于：2026-10-20
- 收录于：2026-10-20
- 原始资源：<https://github.com/akiselev/ilspy-cli>
- 一手来源：<https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/README.md>
- 目录页面：<https://awesomerea.org/zh/resources/akiselev-ilspy-cli/>
- 记录 JSON：<https://awesomerea.org/resources/akiselev-ilspy-cli/record.json>
- 英文版：[English](https://awesomerea.org/resources/akiselev-ilspy-cli/index.md)

## 使用条件与局限

- 构建需要 Rust 工具链与 .NET 8 SDK；build.rs 调用 dotnet publish 构建 C# 桥接层，其项目固定使用 ICSharpCode.Decompiler 9.1.0.7988。反编译需要 .NET 8 运行时，detect 命令走独立的纯 Rust 路径。
- 方法选择仅在指定类型内取第一个同名方法，不按签名区分重载；源码搜索会跳过反编译抛异常的类型，因此空结果不证明整个程序集中没有所查模式。
- 集成测试构建一个小型 SampleLib 样例并检查命令输出，包括简单的 Add 方法。
- README 与 Cargo 元数据声明 GPL-3.0，但完整固定提交中没有单独的 LICENSE／COPYING 正文；上游 ILSpy 引擎与用户提供的程序集仍适用各自的许可条件。

## 一手来源

1. <https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/README.md>
2. <https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/src/main.rs>
3. <https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/src/ilspy/detect.rs>
4. <https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/src/bridge/mod.rs>
5. <https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/bridge/IlSpyBridge.cs>
6. <https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/bridge/IlSpyBridge.csproj>
7. <https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/tests/integration_tests.rs>
8. <https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/tests/fixtures/SampleLib/SampleClass.cs>
9. <https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/Cargo.toml>
10. <https://github.com/akiselev/ilspy-cli/blob/089895f16a9031bb8391db13c2160def9a2e8b60/AGENTS.md>

## 同分区更多条目：应用

- [React-Decode](https://awesomerea.org/zh/resources/react-decode/index.md) · 工具
- [abc-decompiler 鸿蒙方舟字节码反编译器](https://awesomerea.org/zh/resources/abc-decompiler/index.md) · 工具
- [slicer 浏览器端 Java 逆向工具](https://awesomerea.org/zh/resources/slicer/index.md) · 工具
- [APK Studio Android 逆向 IDE](https://awesomerea.org/zh/resources/apk-studio/index.md) · 工具
- [APKiD Android 加壳与混淆识别工具](https://awesomerea.org/zh/resources/apkid/index.md) · 工具
- [dex2jar Android DEX 转换工具集](https://awesomerea.org/zh/resources/dex2jar/index.md) · 工具

## 关于此条目

说明已依据一手来源复核。
原创说明采用 MIT 许可；外部项目、论文与素材保留各自的权利和许可。
