使用专有标头反编译已编译的 Java 文件

发布于 2024-10-01 21:36:35 字数 485 浏览 0 评论 0原文

我有一个文件,它是使用专有程序编译的二进制 java 文件。我尝试在一些标准反编译器中打开它,但它们无法识别它。

我怀疑这是因为根据在十六进制编辑器中查看文件添加了一些特定的专有标头。有没有办法检测java字节码在此文件上的开始和结束位置,或者如何提取它,以便我可以通过像 这个?非常感谢任何帮助。

[编辑]

作为旁注,我想知道这是如何实现的,换句话说,Java 的哪些功能/功能允许您以这样的定制方式使用他们的编译器?

替代文本 PS 如果在其他选项卡中打开图像会更大。 替代文字

I've got a file that is a binary java file that was compiled using a proprietary program. I've tried to open this up in some of the standard decompilers but they will not recognize it.

I suspect it's because some specific proprietary headers have been added, based on looking at the file in a hex editor. Is there any way to detect where the java bytecode begins and ends on this file, or how to extract it so I can run it through a decompiler like this one? Any help is much appreciated.

[Edit]

As a side note i'd like to know how this was achieved, in other words what facility/feature of Java allows you to use their compiler in such a customized way as this?

alt text
P.S. The image is bigger if you open it in another tab.
alt text

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

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

发布评论

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

评论(2

毅然前行 2024-10-08 21:36:35

我的猜测是它是一个加密的罐子。编译后的代码仍然必须是 Java 字节码才能在 JVM 上运行,除非他们自己编写代码,而这是极不可能的。该过程的专有部分可能是对 jar 进行加密,以便在没有正确的解密密钥的情况下它不会运行。

如果是这种情况,则包的另一部分必须具有正确的密钥和解密机制。您说它是一个二进制 Java 文件,但这可能意味着 .class 文件或 jar 文件。

这段代码是如何执行的呢?您是否必须自己启动 jvm(“c:/>java com.mystery.App”)或者它是由其他可执行文件(exe、jar、batch 等)使用的模块?

My guess is it is an encrypted jar. The compiled code still has to be Java bytecode to run on a JVM unless they wrote their own which is highly unlikely. The proprietary part of the process may be the encryption of the jar so that it won't run without the proper decryption key.

If that is the case, there has to be another part of the package that has both the proper key and mechanism to decrypt it. You say that it is a binary Java file but that could mean a .class file or a jar file.

How is this code executed? Do you have to start the jvm yourself ("c:/>java com.mystery.App") or is it a module used by some other executable (exe, jar, batch, etc.)?

寄离 2024-10-08 21:36:35

您是否尝试过 unpack200

Did you try unpack200?

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