diff --git a/BytecodeViewer Beta 1.5.1.jar b/BytecodeViewer Beta 1.5.1.jar new file mode 100644 index 000000000..e73bb4fde Binary files /dev/null and b/BytecodeViewer Beta 1.5.1.jar differ diff --git a/README.txt b/README.txt index 83c8c92dd..f2316d282 100644 --- a/README.txt +++ b/README.txt @@ -122,4 +122,6 @@ Changelog: 11/1/2014 - Updated and improved the search function, it now prints out more useful information. 11/1/2014 - Fixed a UI issue with the Replace All Strings plugin. 11/2/2014 - Added search function to the Class Viewer. -11/2/2014 - Updated Procyon to procyon-decompiler-0.5.27. \ No newline at end of file +11/2/2014 - Updated Procyon to procyon-decompiler-0.5.27. +--- Beta 1.5.1 ---: +11/2/2014 - Fixed a CFR issue with packages. \ No newline at end of file diff --git a/VERSION b/VERSION index a9eaba36c..a56d32721 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Beta 1.5 \ No newline at end of file +Beta 1.5.1 \ No newline at end of file diff --git a/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java b/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java index 256cfa412..3f2430535 100644 --- a/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java +++ b/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java @@ -152,6 +152,8 @@ * 11/1/2014 - Fixed a UI issue with the Replace All Strings plugin. * 11/2/2014 - Added search function to the Class Viewer. * 11/2/2014 - Updated Procyon to procyon-decompiler-0.5.27. + * ----Beta 1.5.1-----: + * 11/2/2014 - Fixed a CFR issue with packages. * * @author Konloch * @@ -170,7 +172,7 @@ public class BytecodeViewer { public static String fs = System.getProperty("file.separator"); public static String nl = System.getProperty("line.separator"); public static String tempDirectory = "bcv_temp"; - public static String version = "Beta 1.5"; + public static String version = "Beta 1.5.1"; public static void main(String[] args) { cleanup(); diff --git a/src/the/bytecode/club/bytecodeviewer/decompilers/java/CFRDecompiler.java b/src/the/bytecode/club/bytecodeviewer/decompilers/java/CFRDecompiler.java index 9c055d2b0..9bd336b48 100644 --- a/src/the/bytecode/club/bytecodeviewer/decompilers/java/CFRDecompiler.java +++ b/src/the/bytecode/club/bytecodeviewer/decompilers/java/CFRDecompiler.java @@ -55,19 +55,8 @@ public String decompileClassNode(ClassNode cn) { tempClass.delete(); - for(File outputJava : new File(fuckery).listFiles()) { - String s; - try { - s = DiskReader.loadAsString(outputJava.getAbsolutePath()); - - outputJava.delete(); - - return s; - } catch (Exception e) { - e.printStackTrace(); - } - } - return "CFR error! Send the stacktrace to Konloch at http://the.bytecode.club or konloch@gmail.com"; + return findFile(new File(fuckery).listFiles()); + } Random r = new Random(); @@ -83,6 +72,24 @@ public String fuckery(String start) { return null; } + public String findFile(File[] fA) { + for(File f : fA) { + if(f.isDirectory()) + return findFile(f.listFiles()); + else { + String s = ""; + try { + s = DiskReader.loadAsString(f.getAbsolutePath()); + } catch(Exception e) { + e.printStackTrace(); + return "CFR error! Send the stacktrace to Konloch at http://the.bytecode.club or konloch@gmail.com"; + } + return s; + } + } + return "CFR error! Send the stacktrace to Konloch at http://the.bytecode.club or konloch@gmail.com"; + } + public String[] generateMainMethod(String filePath, String outputPath) { return new String[] { filePath, diff --git a/src/the/bytecode/club/bytecodeviewer/gui/SearchingPane.java b/src/the/bytecode/club/bytecodeviewer/gui/SearchingPane.java index d9888a955..ffe1ca5c9 100644 --- a/src/the/bytecode/club/bytecodeviewer/gui/SearchingPane.java +++ b/src/the/bytecode/club/bytecodeviewer/gui/SearchingPane.java @@ -21,9 +21,7 @@ import javax.swing.tree.TreeNode; import javax.swing.tree.TreePath; -import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.ClassNode; -import org.objectweb.asm.tree.MethodNode; import the.bytecode.club.bytecodeviewer.*; import the.bytecode.club.bytecodeviewer.searching.*;