「decompile.py」

  CREATED BY JENKINSBOT

decompile.py,反编译器。只支持JAVA7,没有JAVA8,也没有JAVA6。尤其是lambdas的反编译。

Usage

python Krakatau\decompile.py [-nauto] [-path PATH] [-out OUT] [-r] [-skip]

target

PATH : An optional list of directories, jars, or zipfiles to search for

classes in. Krakatau will attempt to automatically detect and add the

jar containing core language classes, but you can disable this with

the -nauto option. For multiple jars, you can either pass a semicolon

seperated list of jars or pass the -path option multiple times.

OUT : Directory name where source files are to be written. Defaults to the

current directory. If the name ends in .zip or .jar, the output will be a

zipfile instead.

-r : Decompiles all .class files found in the directory target (recursively)

-skip : Continue upon errors. If an error occurs while decompiling a specific

method, the traceback will be printed as comments in the source file. If the

error occurs while decompiling at the class level, no source file will be

emitted and an error message will be printed to the console.

target : Class name or jar name to decompile. If a jar is specified, all

classes in the jar will be decompiled. If -r is specified, this should

be a directory.

The Krakatau decompiler takes a different approach to most Java decompilers.
It can be thought of more as a compiler whose input language is Java bytecode
and whose target language happens to be Java source code. Krakatau takes in
arbitrary bytecode, and attempts to transform it to equivalent Java code. This
makes it robust to minor obfuscation, though it has the drawback of not
reconstructing the “original” source, leading to less readable output than a
pattern matching decompiler would produce for unobfuscated Java classes.

However, it will not always produce valid Java since there are some things
that are difficult or impossible to decompile at all thanks to the limitations
of the Java language. In most cases, Krakatau will try to at least produce
readable pseudocode, but sometimes it may just throw an exception.

Warning

Output on Windows uses UNC-style paths, which means that depending on

the input class name, it may create files which are difficult or impossible

to access through Windows Explorer or other non-UNC aware tools.

Note

that the decompiler does not currently support Java 8 or invokedynamic,
although the assembler and disassembler do.