From 37467e4a7b5e05e4da413a1e06e597fa806b72e4 Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 15 Aug 2014 01:43:48 -0400 Subject: 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... --- src/cuchaz/enigma/Deobfuscator.java | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/cuchaz/enigma/Deobfuscator.java') 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 @@ package cuchaz.enigma; import java.io.File; -import java.io.FileInputStream; import java.io.IOException; -import java.io.InputStream; import java.io.StringWriter; import java.util.List; import java.util.jar.JarFile; @@ -58,18 +56,9 @@ public class Deobfuscator m_file = file; m_jar = new JarFile( m_file ); - // build the ancestries - InputStream jarIn = null; - try - { - m_jarIndex = new JarIndex( m_jar ); - jarIn = new FileInputStream( m_file ); - m_jarIndex.indexJar( jarIn ); - } - finally - { - Util.closeQuietly( jarIn ); - } + // build the jar index + m_jarIndex = new JarIndex(); + m_jarIndex.indexJar( m_jar ); // config the decompiler m_settings = DecompilerSettings.javaDefaults(); @@ -105,6 +94,7 @@ public class Deobfuscator // update decompiler options m_settings.setTypeLoader( new TranslatingTypeLoader( m_jar, + m_jarIndex, getTranslator( TranslationDirection.Obfuscating ), getTranslator( TranslationDirection.Deobfuscating ) ) ); -- cgit v1.2.3