反编译代码(与语言无关)

发布于 2024-08-09 09:06:20 字数 1536 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

呆头 2024-08-16 09:06:20

如果它是托管 DLL (.NET),您可以使用 ReflectorILDASM,您将看到 < em>IL 代码。 (编辑 2017-02-03:在 7 年多的时间里,.NET 反汇编程序当然取得了很大进步,现在能够生成非常好的 C# 代码)

如果它是非托管 DLL(本机),那么您就不走运了。您能做的最好的事情就是加载反汇编程序。除非你确切地知道自己想去哪里,否则你几乎一事无成。

If it's a managed DLL (.NET), you can open it using tools such as Reflector or ILDASM and you'll see the IL code. (Edit 2017-02-03: In 7+ years, .NET disassemblers have of course progressed a lot and are now able to produce very decent C# code)

If it's an unmanaged DLL (native), you're out of luck. The best you can do is load a disassembler. Which leads you nearly nowhere unless you know exactly where you want to go.

静水深流 2024-08-16 09:06:20

您对反编译程序集感兴趣。下面是反编译 .NET 程序集的开始: https://web.archive.org/web/20210802164013/https://aspnet.4guysfromrolla.com/articles/080404-1.aspx

.NET社区中用于反编译程序集的流行工具是 .NET Reflector

You're interested in decompiling assemblies. Well here's a start on decompiling .NET assemblies: https://web.archive.org/web/20210802164013/https://aspnet.4guysfromrolla.com/articles/080404-1.aspx

A popular tool in the .NET community for decompiling assemblies is .NET Reflector

浮生未歇 2024-08-16 09:06:20

将目标代码反编译为源代码是不可能的(1)。检查接口完全是另一回事;有一些工具存在,但我不知道有什么工具。

(1) - 好吧,对于某些语言和在某些条件下是可能的,但生成的代码并不完全可读...

您将获得的唯一可读代码是汇编语言(有很多程序可以实现此目的) 。有一些语言可以反编译为原始(或接近)源代码,例如 Visual Basic 3。但是现在谁用 VB3 编写程序呢?没有人。至于查看 DLL 的导入/导出,您可以使用以下位置的 Dependency walker 程序:
http://www.dependencywalker.com/

对于某些语言,例如 Visual Basic 或 C#,您可以如果您使用良好的反编译器并且代码没有被混淆(大多数情况下不是),则可以获得可读的源代码

如果您对反编译感兴趣,请检查此站点:
http://www.program-transformation.org/Transform/DecompilationPossible

对于 .Net ,.NET Reflector 是正确的选择。它将把您的 dll 反编译为 C# 或 VB.NET http://www.aisto.com/roeder /点网/

It's not possible(1) to decompile object code to source code. Inspecting an interface is another matter altogether; there are tools that exist but I don't know of any offhand.

(1) - well, OK, it is possible for some languages and under certain conditions but the code produced won't exactly be readable...

The only readable code you'll get is assembly language (there are many programs for this). There are some languages that can be decompiled to original (or close to) source code, such as Visual Basic 3. But who writes programs in VB3 nowadays? Nobody. As far as seeing the imports/exports of the DLL, you can use the Dependency walker program from:
http://www.dependencywalker.com/

For some languages, for example Visual Basic or C#, you can get readable source-code if you use a good decompiler and the code is not obfuscated (which it most of the time isn't)

Check this site if you're interested in decompiling:
http://www.program-transformation.org/Transform/DecompilationPossible

For .Net, .NET Reflector is the way to go. It will decompile your dll into either C# or VB.NET http://www.aisto.com/roeder/dotnet/

無心 2024-08-16 09:06:20

对于 .NET,Reflector 将执行此操作; “专业”版本(现在处于预览版)有一个 Visual Studio 插件,可让您在 VS IDE 本身内调试大多数托管代码,而不是作为一个单独的工具。到目前为止,它看起来非常甜蜜。

Reflector EAP http://www.simple-talk.com/社区/博客/alex/attachment/74919.ashx

For .NET, Reflector will do this; the "Pro" version (now in preview) has a plugin for Visual Studio that lets you debug into most managed code within the VS IDE itself, rather than being a separate tool. So far, it is looking very sweet.

Reflector EAP http://www.simple-talk.com/community/blogs/alex/attachment/74919.ashx

半山落雨半山空 2024-08-16 09:06:20

它们是不同的格式。

对于.NET dll,您可以使用ildasm.exe(与.net框架一起安装)或.NET Reflector(下载)

They are different formats.

For a .NET dll, you can use ildasm.exe (installed with .net framework) or .NET Reflector (download)

允世 2024-08-16 09:06:20

关于反编译 .NET 已经说得够多了。如果您决定开始对本机二进制文件进行逆向工程,我建议使用 IDA

它支持不同的操作系统、处理器架构、检测并显示标准库的使用情况(以便您可以轻松找到感兴趣的地方)、显示子例程之间的依赖关系图、显示堆栈中的过程参数等。它还可以编写脚本,并且有脚本可以检测 C++ 类和 try-catch 块查找 UUID 的 COM 接口名称 并执行许多其他操作。这是一个很棒的工具,并且有免费版本。

There was enough said about decompiling .NET. If you ever decide to start with reverse-engineering native binaries, I recommend to use IDA.

It supports different OSs, processor architectures, detects and shows standard libraries usage (so you can easily find places of interest), shows graphs of dependencies between subroutines, shows procedures arguments at stack etc. It also can be scripted and there're scripts that detect C++ classes and try-catch blocks, finds COM interfaces names for UUIDs and do many other things. It's a great tool and there's free version of it.

感悟人生的甜 2024-08-16 09:06:20

要反编译.Net DLL,您可以使用.Net Reflector。它适用于用任何 .Net 语言编写的 DLL。

要反编译 Java JAR 文件,请尝试 Java Decompiler

反编译本机代码(C++)要困难得多。

To decompile a .Net DLL, you can use .Net Reflector. It will work for DLLs written in any .Net language.

To decompile a Java JAR file, try Java Decompiler.

Decompiling native code (C++) is much more difficult.

罪歌 2024-08-16 09:06:20

除非您使用 .NET 领域,否则 DLL 中的内容都是二进制代码。您可以看到这一点的唯一语言是汇编语言 - 这只是表示机器语言的助记方式。

Unless you're in .NET land, what's in a DLL is binary code. The only language you can see this in is assembler - which is just a mnemonic way of presenting machine language.

む无字情书 2024-08-16 09:06:20

无论您使用哪种 .Net 语言 - 所有内容都将被编译为 MSIL(Microsoft 中间语言)。您可以使用 Ildasm 等工具将其转换为可读的“反汇编文本”:

http: //msdn.microsoft.com/en-us/library/f7dy01k1.aspx

您还可以使用 Reflector:
http://www.builderau.com.au/program/asp/soa/Look-inside-NET-DLL-files-with-Reflector/0,339028371,339287377,00.htm

到检查类和方法(它支持不同的.Net语言)

Irrespective of a .Net language you use - everything will be compiled to MSIL (Microsoft intermediate language). You can use tools like Ildasm to convert it to readable "disassembled text":

http://msdn.microsoft.com/en-us/library/f7dy01k1.aspx

You can also use Reflector:
http://www.builderau.com.au/program/asp/soa/Look-inside-NET-DLL-files-with-Reflector/0,339028371,339287377,00.htm

to examine classes and methods (it supports different .Net languages)

Smile简单爱 2024-08-16 09:06:20

对于本机 DLL 的此程序,Hex-Rays Decompiler(优秀之上的一层) IDAPro 反汇编器-调试器)可能是您能得到的最接近的了。它不会恢复原始代码,而是将反汇编代码转换为类似 C 的伪代码。不过它并不便宜。

For native DLL's this program, Hex-Rays Decompiler (a layer on top of the excellent IDAPro disassembler-debugger) is probably as close as you can get. It doesn't restore the original code but converts the disassembly in a C-like pseudocode. It's not cheap though.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文