可以反编译哪些类型的可执行文件?

发布于 2024-07-04 22:17:00 字数 98 浏览 7 评论 0原文

我认为 java 可执行文件(jar 文件)很容易反编译并获取源代码。

其他语言呢? .net 等等?

哪些语言只能编译为可反编译的代码?

I think that java executables (jar files) are trivial to decompile and get the source code.

What about other languages? .net and all?

Which all languages can compile only to a decompile-able code?

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

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

发布评论

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

评论(5

黑色毁心梦 2024-07-11 22:17:00

一般来说,像Java、C#和VB.NET这样的语言相对容易反编译,因为它们被编译为中间语言,而不是纯机器语言。 在 IL 形式中,它们在编译为机器语言时比 C 代码保留更多的元数据。

从技术上讲,您并没有获得原始源代码,而是源代码的变体,在编译时,它将返回编译后的代码。 它与源代码不同,因为注释、注释和编译器指令等内容通常不会转移到编译后的代码中。

In general, languages like Java, C#, and VB.NET are relatively easy to decompile because they are compiled to an intermediary language, not pure machine language. In their IL form, they retain more metadata than C code does when compiled to machine language.

Technically you aren't getting the original source code out, but a variation on the source code that, when compiled, will give you the compiled code back. It isn't identical to the source code, as things like comments, annotations, and compiler directives usually aren't carried forward into the compiled code.

还给你自由 2024-07-11 22:17:00

托管语言可以轻松反编译,因为可执行文件必须包含大量元数据才能支持反射.
像 C++ 这样的语言可以编译为本机代码。 程序结构在编译\翻译过程中可以完全改变。
编译器可以轻松地替换\合并\删除部分代码。 原始代码和编译(本机)代码之间不存在一对一的关系。

Managed languages can be easily decompiled because executable must contain a lot of metadata to support reflection.
Languages like C++ can be compiled to native code. Program structure can be totally changed during compilation\translation processes.
Compiler can easily replace\merge\delete parts of your code. There is no 1 to 1 relationship between original and compiled (native) code.

江南烟雨〆相思醉 2024-07-11 22:17:00

.NET 非常容易反编译。 实现这一目标的最佳工具是 RedGate 最近收购的 .NET Reflector

.NET is very easy to decompile. The best tool to do that would be the .NET reflector recently acquired by RedGate.

陌上芳菲 2024-07-11 22:17:00

大多数语言都可以反编译,但有些语言比其他语言更容易反编译。 .Net 和 Java 将有关原始程序的更多信息放入可执行文件中(方法名称、变量名称等),以便您获得更多原始信息。

例如,C++ 会将变量和函数等转换为内存地址(是的,我知道这是一个粗略的简化),因此反编译器不会知道调用了什么内容。 但您仍然可以获得程序的一些结构。

Most languages can be decompiled but some are easier to decompile than others. .Net and Java put more information about the original program in the executables (method names, variable names etc.) so you get more of your original information back.

C++ for example will translate variables and functions etc. to memory adresses (yeah I know this is a gross simplification) so the decompiler won't know what stuff was called. But you can still get some of the structure of the program back though.

简单气质女生网名 2024-07-11 22:17:00

VB6 如果编译为 pcode,也可以使用 P32Dasm、Flash 反编译为几乎完整的源代码(或动作脚本)也可以使用 Flare 之类的东西反编译为完整源代码

VB6 if compiled to pcode is also possible to decompile to almost full source using P32Dasm, Flash (or actionscript) is also possible to decompile to full source using something like Flare

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