forked from java-deobfuscator/deobfuscator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
849 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
<!-- | ||
If this issue is a bug report, please make sure that: | ||
If this issue is a bug report (i.e. something wasn't deobfuscated), | ||
please read the FAQs first (bottom of the README). | ||
* The error does not mention "Could not locate a class file" | ||
If it does, read the FAQs (in the README) | ||
* The error does not mention "A StackOverflowError occurred during deobfuscation" | ||
If it does, read the FAQs (in the README) | ||
* You've provided some way of reproducing the bug, but only if you have permission to do so | ||
If you don't have permission or don't provide a sample, feel free to open an issue anyways, but know that it may be closed without a fix | ||
* You've provided the config file you used (or more precisely, the transformers you used) | ||
* You've provided the error (please don't paste the error directly. put it in a code block) | ||
Code blocks can be created like so: | ||
``` | ||
This is inside a code block | ||
``` | ||
Please make sure that you've provided a copy of the file you're deobfuscation if possible. | ||
If you don't have permission to provide the entire program or you don't want to, | ||
then there's not much I can do. I'm not psychic. | ||
You should also provide a copy of the config/code you're using to run the deobfuscator. | ||
Order of transformers matter, and sometimes you just need to switch them around. | ||
Please paste the config/code in a code block. Here's how to do that: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting | ||
Thank you! | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Usage | ||
### As a library | ||
|
||
```java | ||
public class SomeRandomDeobfuscator { | ||
public static void main(String[] args) throws Throwable { | ||
Configuration config = new Configuration(); | ||
config.setInput(new File("input.jar")); | ||
config.setOutput(new File("output.jar")); | ||
config.setPath(Arrays.asList( | ||
new File("C:\\Program Files\\Java\\jdk_8\\jre\\lib\\rt.jar"), | ||
new File("C:\\Program Files\\Java\\jdk_8\\jre\\lib\\jce.jar"), | ||
new File("C:\\Program Files\\Java\\jdk_8\\jre\\lib\\ext\\jfxrt.jar"), | ||
new File("C:\\Program Files\\Java\\jdk_8\\lib\\tools.jar") | ||
)); | ||
config.setTransformers(Arrays.asList( | ||
TransformerConfig.configFor(PeepholeOptimizer.class) | ||
)); | ||
new Deobfuscator(config).start(); | ||
} | ||
} | ||
``` | ||
|
||
### CLI | ||
|
||
If you don't want to import the project, you can always use the command line interface. | ||
|
||
| Argument | Description | | ||
| --- | --- | | ||
| --config | The configuration file | | ||
|
||
You may specify multiple transformers, and they will be applied in the order given. Order does matter as sometimes one transformation depends on another not being present. | ||
|
||
If you wish to use one of the default transformers, then you may remove the `com.javadeobfuscator.deobfuscator.transformers` prefix. | ||
|
||
Here is a sample `config.yaml`: | ||
|
||
```yaml | ||
input: input.jar | ||
output: output.jar | ||
transformers: | ||
- normalizer.MethodNormalizer: | ||
mapping-file: normalizer.txt | ||
- stringer.StringEncryptionTransformer | ||
- normalizer.ClassNormalizer: {} | ||
normalizer.FieldNormalizer: {} | ||
``` |
Oops, something went wrong.