30

有没有什么软件可以做到这一点?我在互联网上没有找到任何有用的信息,所以我在这里问。

4

10 回答 10

30

你不能得到确切的代码,但你可以得到它的反编译版本。

最受欢迎(也是最好的)工具是Reflector,但也有其他 .Net 反编译器(例如Dis#)。您还可以使用与 .Net Framework SDK 工具捆绑在一起的ILDASM对 IL 进行反编译。

于 2011-01-16T16:03:17.240 回答
21

只有托管语言c#Java可以完全反编译。您可以查看完整的源代码。因为Win32 dll您无法获取源代码。

对于 CSharp dll 使用DotPeek因为它是免费的,并且与ReDgate .Net 编译器一样工作

玩得开心。

于 2012-12-06T06:43:16.170 回答
9

使用dotPeek

在此处输入图像描述

选择.dll要反编译的

在此处输入图像描述

就是这样

于 2016-08-30T15:54:33.300 回答
6

使用.NET 反射器

于 2011-01-16T16:01:46.233 回答
4

使用折射镜。从这里下载。

  1. 安装后打开软件。
  2. 按 Ctrl + O 并选择您的 DLL 文件。
  3. Dll 将显示在左窗格中。
  4. 右键单击 Dll 并选择导出源代码。
  5. 选择要导出文件的文件夹
  6. 稍等片刻,可能需要 2-3 分钟

在此处输入图像描述

于 2019-05-20T10:38:35.430 回答
2

您可以使用Reflector也可以使用Add-In FileGenerator将源代码提取到项目中。

于 2011-01-16T16:08:26.187 回答
2

可以使用dotPeek 唯一要说的是,使用的时候,右键选择类Decompiled Source而不是双击,否则dotpeek只会显示本地cs文件的内容,不会显示反编译后的内容。

选项实例

于 2019-01-24T02:10:20.073 回答
0

如果您只想了解 dll 程序集中的一些基础知识,例如类、方法等,请动态加载它们

你可以使用微软提供的 IL Disassembler 工具。

一般位于:“C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin”

于 2017-01-23T08:46:50.377 回答
0

我使用Refractor从 dll 文件中恢复我的脚本/代码。

于 2018-12-11T09:14:11.810 回答
-1
 public async void Decompile(string DllName)
 {
     string destinationfilename = "";

     if (System.IO.File.Exists(DllName))
     {
         destinationfilename = (@helperRoot + System.IO.Path.GetFileName(medRuleBook.Schemapath)).ToLower();
         if (System.IO.File.Exists(destinationfilename))
         { 
             System.IO.File.Delete(destinationfilename);
         }

         System.IO.File.Copy(DllName, @destinationfilename);
     }
        // use dll-> XSD
     var returnVal = await DoProcess(
            @helperRoot + "xsd.exe", "\"" + @destinationfilename + "\"");

     destinationfilename = destinationfilename.Replace(".dll", ".xsd");

     if (System.IO.File.Exists(@destinationfilename))
     {
          // now use XSD
          returnVal =
            await DoProcess(
              @helperRoot + "xsd.exe", "/c /namespace:RuleBook /language:CS " + "\"" + @destinationfilename + "\"");

            if (System.IO.File.Exists(@destinationfilename.Replace(".xsd", ".cs")))
            {
                string getXSD = System.IO.File.ReadAllText(@destinationfilename.Replace(".xsd", ".cs"));
           
            }
        }
}
于 2019-04-05T13:21:11.770 回答