diff options
| author | 2014-08-15 01:43:48 -0400 | |
|---|---|---|
| committer | 2014-08-15 01:43:48 -0400 | |
| commit | 37467e4a7b5e05e4da413a1e06e597fa806b72e4 (patch) | |
| tree | 4c76a76aa3379fc236977646af48ec63dcf1712e /src/cuchaz/enigma/Deobfuscator.java | |
| parent | Added tag v0.1 beta for changeset 7beed0616320 (diff) | |
| download | enigma-fork-37467e4a7b5e05e4da413a1e06e597fa806b72e4.tar.gz enigma-fork-37467e4a7b5e05e4da413a1e06e597fa806b72e4.tar.xz enigma-fork-37467e4a7b5e05e4da413a1e06e597fa806b72e4.zip | |
trying to get inner/anonymous classes working... I have a working heuristic in place to detect anonymous classes, but I can't seem to get Procyon to decompile them correctly. I'm writing the InnerClasses attribute and translating all the inner class names, but there must be something else I'm missing...
Diffstat (limited to 'src/cuchaz/enigma/Deobfuscator.java')
| -rw-r--r-- | src/cuchaz/enigma/Deobfuscator.java | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/cuchaz/enigma/Deobfuscator.java b/src/cuchaz/enigma/Deobfuscator.java index 770172e..127a0d9 100644 --- a/src/cuchaz/enigma/Deobfuscator.java +++ b/src/cuchaz/enigma/Deobfuscator.java | |||
| @@ -11,9 +11,7 @@ | |||
| 11 | package cuchaz.enigma; | 11 | package cuchaz.enigma; |
| 12 | 12 | ||
| 13 | import java.io.File; | 13 | import java.io.File; |
| 14 | import java.io.FileInputStream; | ||
| 15 | import java.io.IOException; | 14 | import java.io.IOException; |
| 16 | import java.io.InputStream; | ||
| 17 | import java.io.StringWriter; | 15 | import java.io.StringWriter; |
| 18 | import java.util.List; | 16 | import java.util.List; |
| 19 | import java.util.jar.JarFile; | 17 | import java.util.jar.JarFile; |
| @@ -58,18 +56,9 @@ public class Deobfuscator | |||
| 58 | m_file = file; | 56 | m_file = file; |
| 59 | m_jar = new JarFile( m_file ); | 57 | m_jar = new JarFile( m_file ); |
| 60 | 58 | ||
| 61 | // build the ancestries | 59 | // build the jar index |
| 62 | InputStream jarIn = null; | 60 | m_jarIndex = new JarIndex(); |
| 63 | try | 61 | m_jarIndex.indexJar( m_jar ); |
| 64 | { | ||
| 65 | m_jarIndex = new JarIndex( m_jar ); | ||
| 66 | jarIn = new FileInputStream( m_file ); | ||
| 67 | m_jarIndex.indexJar( jarIn ); | ||
| 68 | } | ||
| 69 | finally | ||
| 70 | { | ||
| 71 | Util.closeQuietly( jarIn ); | ||
| 72 | } | ||
| 73 | 62 | ||
| 74 | // config the decompiler | 63 | // config the decompiler |
| 75 | m_settings = DecompilerSettings.javaDefaults(); | 64 | m_settings = DecompilerSettings.javaDefaults(); |
| @@ -105,6 +94,7 @@ public class Deobfuscator | |||
| 105 | // update decompiler options | 94 | // update decompiler options |
| 106 | m_settings.setTypeLoader( new TranslatingTypeLoader( | 95 | m_settings.setTypeLoader( new TranslatingTypeLoader( |
| 107 | m_jar, | 96 | m_jar, |
| 97 | m_jarIndex, | ||
| 108 | getTranslator( TranslationDirection.Obfuscating ), | 98 | getTranslator( TranslationDirection.Obfuscating ), |
| 109 | getTranslator( TranslationDirection.Deobfuscating ) | 99 | getTranslator( TranslationDirection.Deobfuscating ) |
| 110 | ) ); | 100 | ) ); |