Decompile compiled Java file with proprietary headers

旧城冷巷雨未停 提交于 2019-12-24 09:31:00

问题


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?

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


回答1:


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.)?




回答2:


Did you try unpack200?



来源:https://stackoverflow.com/questions/4151696/decompile-compiled-java-file-with-proprietary-headers

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!