Reflector使用详解

    Reflector是由微软员工Lutz Roeder编写的免费程序。Reflector的出现使.NET程序员眼前豁然开朗,因为这个免费工具可以将.NET程序集中的中间语言反编译成C#或 者Visual Basic代码。除了能将中间语言转换为C#或Visual Basic以外,Reflector还能够提供程序集中类及其成员的概要信息、提供查看程序集中中间语言的能力以及提供对第三方插件的支持。

 

1、下载Reflector,下载地址:http://reflector.red-gate.com/

 

2、解压后,双击Reflector.exe,如果有选择默认版本的.Net Framework,根据需要选择即可。你选择的版本不同则出现的默认程序集也不同,我选择的是.Net3.5;

 

 

3、点击file-open选择要反编译的DLL,打开后程序集的命名空间会出现在列表中;

 

4、点击树形列表中的类,右边就会出现相应的反编译代码。反编译后的代码和原代码基本没有什么区别;

 

 

5、如果想把反编译后的代码导入到文件中,我们可以使用Reflector.FileDisassembler这个Reflector插件,下面介绍Reflector.FileDisassembler插件用法;

 

6、Reflector.FileDisassembler的下载地址:http://www.denisbauer.com/NETTools/FileDisassembler.aspx
7、运行Reflector,点击View—add-ins…—Add,选择 Reflector.FileDisassembler.dll (下载Reflector. FileDisassembler解压后的文件中有)添加成功后,Close关闭对话框。在tools菜单中会有file disassembler选项;

 

 

8、选择Tools—File Disassembler;

 

9、选择需反编译的类文件,点击Generate按钮,此时需要选择输入文件名,也可以直接点击OK。Reflector将会自动创建一个文件夹并生产类文件,该文件的路径在Reflector.exe的目录下;

 

 

 

 

 

 

 

另外还有一些Reflector的相关插件下载:

 

 

 

Reflector.FileDisassembler
This add-in can be used to dump the disassembler output to files for any Reflector supported language.
WebsiteDownload

 

Reflector.CodeMetrics
Analyses .NET assemblies and shows design quality metrics. The menu item is registered under the "Tools" menu.
WebsiteDownload

 

Reflector.SQL2005Browser
This add-in allows to browse .NET assemblies stored in SQL Server 2005 (Yukon) databases.
WebsiteDownload

 

Reflector.DelphiLanguage
The Delphi view that is used inside .NET Reflector provided as a language add-in.
WebsiteDownload

 

Reflector.McppLanguage
This add-in extends Reflector with a Managed C++ language rendering module.
WebsiteDownload

 

Reflector.ChromeLanguage
This add-in extends Reflector with a Chrome language rendering module.
WebsiteDownload

 

Reflector.Diff
This add-in shows differences between two versions of the same assembly.
WebsiteDownload

 

Reflector.VisualStudio
This program is hosting .NET Reflector inside the Visual Studio 2003 IDE. Run Reflector.VisualStudio.exe to register the add-in with Visual Studio.
WebsiteDownload

 

Reflector.ClassView
Shows class definitions as plain text with color coding. The menu item is registered under the "Tools" menu.
WebsiteDownload

 

Reflector.CodeModelView
This add-in shows the underlying code model objects for a selected node in .NET Reflector. The menu item is registered under the "Tools" menu.
WebsiteDownload

 

Reflector.FileGenerator
This add-in can be used to dump the disassembler output to files for any Reflector supported language.
Download

 

Reflector.Graph
This add-in draws assembly dependency graphs and IL graphs.
WebsiteDownload

 

Reflector.OpenRunningAssembly
Opens an assembly or dependency from a process running on the system. The menu item is registered under the "Tools" menu.
WebsiteDownload


posted @ 2012-03-20 10:47  渡蓝  阅读(2916)  评论(0编辑  收藏  举报