diff --git a/BytecodeViewer 2.9.6.jar b/BytecodeViewer 2.9.6.jar deleted file mode 100644 index 4c42cc75..00000000 Binary files a/BytecodeViewer 2.9.6.jar and /dev/null differ diff --git a/BytecodeViewer 2.9.7-preview-3.jar b/BytecodeViewer 2.9.7.jar similarity index 93% rename from BytecodeViewer 2.9.7-preview-3.jar rename to BytecodeViewer 2.9.7.jar index 5892e5f1..994f6e48 100644 Binary files a/BytecodeViewer 2.9.7-preview-3.jar and b/BytecodeViewer 2.9.7.jar differ diff --git a/README.txt b/README.txt index f2bce93d..89172507 100644 --- a/README.txt +++ b/README.txt @@ -361,11 +361,28 @@ Changelog: 04/21/2015 - Changed 'View Panes' to simply 'View'. --- 2.9.5 ---: 05/01/2015 - Added 'pingback' for statistics (to track how many people globally use BCV) ------2.9.6-----: +--- 2.9.6 ---: 05/05/2015 - Fixed a typo in the about window 05/28/2015 - Started importing JD-GUI Decompiler. 05/28/2015 - Compile on refresh and compile on save are now enabled by default. 05/28/2015 - Renamed the File>Save As options to be much more informative. 06/24/2015 - Fixed a logic error with the Field & Method searchers. 06/26/2015 - Updated Procyon & CFR to their latest versions. -07/02/2015 - Added JD-GUI Decompiler. - Huge thanks to the guys behind JD-GUI! <3 (FIVE DECOMPILERS NOW LOL) \ No newline at end of file +07/02/2015 - Added JD-GUI Decompiler. - Huge thanks to the guys behind JD-GUI! <3 (FIVE DECOMPILERS NOW LOL) +--- 2.9.7 ---: +07/02/2015 - Added ajustable font size. +07/05/2015 - Started working on the new Boot Screen. +07/06/2015 - Moved the font size to be under the view menu. +07/06/2015 - Fixed a bug with plugins not being able to grab the currently viewed class. +07/07/2015 - Started adding enjarify as an optional APK converter instead of Dex2Jar. +07/07/2015 - Finished the new Boot Screen +07/09/2015 - Fixed a process leak with krakatau decompiler. +07/09/2015 - Finished adding enjarify. +07/09/2015 - Supressed syntax exceptions due to JD-GUI. +07/09/2015 - Fixed refresh on non-refreshable resources. +07/09/2015 - Fixed opening a class and the name is so big, you cannot close because the [X] does not appear. +07/09/2015 - Added support for smaller screens for the boot screen. +07/16/2015 - Removed the FileFilter classes. +07/16/2015 - Updated the decompiler class to make more sense. +07/16/2015 - Started working on BCV CLI. +07/16/2015 - Finished BCV CLI. \ No newline at end of file diff --git a/libs/apktool_2.0.0rc4_obf.jar b/libs/apktool_2.0.0rc4_obf.jar deleted file mode 100644 index 5a9ae651..00000000 Binary files a/libs/apktool_2.0.0rc4_obf.jar and /dev/null differ diff --git a/libs/apktool_2.0.1_obf.jar b/libs/apktool_2.0.1_obf.jar new file mode 100644 index 00000000..55a82d66 Binary files /dev/null and b/libs/apktool_2.0.1_obf.jar differ diff --git a/libs/baksmali-2.0.3.jar b/libs/baksmali-2.0.3_obf.jar similarity index 100% rename from libs/baksmali-2.0.3.jar rename to libs/baksmali-2.0.3_obf.jar diff --git a/libs/fernflower2015-1.jar b/libs/fernflower2015-1.jar new file mode 100644 index 00000000..681b3b95 Binary files /dev/null and b/libs/fernflower2015-1.jar differ diff --git a/libs/fernflower2015.jar b/libs/fernflower2015.jar deleted file mode 100644 index f0dd605c..00000000 Binary files a/libs/fernflower2015.jar and /dev/null differ diff --git a/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java b/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java index fc668efa..d59781ea 100644 --- a/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java +++ b/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java @@ -86,9 +86,10 @@ import the.bytecode.club.bytecodeviewer.plugin.PluginManager; * add stackmapframes to bytecode decompiler * add stackmapframes remover? * make ez-injection plugin console show all sys.out calls - * Command line parameter to save source * add JEB decompiler optionally, requires them to add jeb library jar externally and disable update check - * add decompile as zip for krakatau-bytecode and smali for CLI + * add decompile as zip for krakatau-bytecode, jd-gui and smali for CLI + * fix hook inject for EZ-Injection + * fix classfile searcher * * -----2.9.7-----: * 07/02/2015 - Added ajustable font size. @@ -116,7 +117,7 @@ public class BytecodeViewer { /*per version*/ public static String version = "2.9.7"; - public static boolean previewCopy = true; + public static boolean previewCopy = false; /*the rest*/ public static MainViewerGUI viewer = null; public static ClassNodeLoader loader = new ClassNodeLoader(); //might be insecure due to assholes targeting BCV, however that's highly unlikely. @@ -145,8 +146,7 @@ public class BytecodeViewer { public static boolean runningObfuscation = false; private static long start = System.currentTimeMillis(); public static String lastDirectory = ""; - public static ArrayList krakatau = new ArrayList(); - public static ArrayList enjarify = new ArrayList(); + public static ArrayList createdProcesses = new ArrayList(); public static Refactorer refactorer = new Refactorer(); public static boolean pingback = false; public static boolean deleteForiegnLibraries = true; @@ -396,10 +396,8 @@ public class BytecodeViewer { Runtime.getRuntime().addShutdownHook(new Thread() { @Override public void run() { - for(Process krakatau : krakatau) - krakatau.destroy(); - for(Process enjarify : enjarify) - enjarify.destroy(); + for(Process proc : createdProcesses) + proc.destroy(); Settings.saveGUI(); cleanup(); } diff --git a/src/the/bytecode/club/bytecodeviewer/CommandLineInput.java b/src/the/bytecode/club/bytecodeviewer/CommandLineInput.java index be58ca0d..cdfcc907 100644 --- a/src/the/bytecode/club/bytecodeviewer/CommandLineInput.java +++ b/src/the/bytecode/club/bytecodeviewer/CommandLineInput.java @@ -82,6 +82,7 @@ public class CommandLineInput { "-decompiler Selects the decompiler, procyon by default", "-i Selects the input file", "-o Selects the output file", + "-t Must either be the fully qualified classname or \"all\" to decompile all as zip", "-nowait Doesn't wait for the user to read the CLI messages" }) System.out.println(s); @@ -302,7 +303,8 @@ public class CommandLineInput { Thread.sleep(5 * 1000); if(target.equalsIgnoreCase("all")) { - Decompiler.jdgui.decompileToZip(output.getAbsolutePath()); + System.out.println("Coming soon."); + //Decompiler.jdgui.decompileToZip(output.getAbsolutePath()); } else { try { ClassNode cn = BytecodeViewer.getClassNode(target); diff --git a/src/the/bytecode/club/bytecodeviewer/Enjarify.java b/src/the/bytecode/club/bytecodeviewer/Enjarify.java index 472a5d1c..7322946b 100644 --- a/src/the/bytecode/club/bytecodeviewer/Enjarify.java +++ b/src/the/bytecode/club/bytecodeviewer/Enjarify.java @@ -40,7 +40,7 @@ public class Enjarify { pb.directory(new File(BytecodeViewer.enjarifyWorkingDirectory)); Process process = pb.start(); - BytecodeViewer.enjarify.add(process); + BytecodeViewer.createdProcesses.add(process); //Read out dir output InputStream is = process.getInputStream(); @@ -96,7 +96,7 @@ public class Enjarify { Process process = pb.start(); - BytecodeViewer.enjarify.add(process); + BytecodeViewer.createdProcesses.add(process); //Read out dir output InputStream is = process.getInputStream(); diff --git a/src/the/bytecode/club/bytecodeviewer/compilers/KrakatauAssembler.java b/src/the/bytecode/club/bytecodeviewer/compilers/KrakatauAssembler.java index e3f79c56..fa0446c5 100644 --- a/src/the/bytecode/club/bytecodeviewer/compilers/KrakatauAssembler.java +++ b/src/the/bytecode/club/bytecodeviewer/compilers/KrakatauAssembler.java @@ -54,7 +54,7 @@ public class KrakatauAssembler extends Compiler { ); Process process = pb.start(); - BytecodeViewer.krakatau.add(process); + BytecodeViewer.createdProcesses.add(process); //Read out dir output InputStream is = process.getInputStream(); diff --git a/src/the/bytecode/club/bytecodeviewer/decompilers/KrakatauDecompiler.java b/src/the/bytecode/club/bytecodeviewer/decompilers/KrakatauDecompiler.java index 9ffd2f3a..63147bb7 100644 --- a/src/the/bytecode/club/bytecodeviewer/decompilers/KrakatauDecompiler.java +++ b/src/the/bytecode/club/bytecodeviewer/decompilers/KrakatauDecompiler.java @@ -65,7 +65,7 @@ public class KrakatauDecompiler extends Decompiler { ); Process process = pb.start(); - BytecodeViewer.krakatau.add(process); + BytecodeViewer.createdProcesses.add(process); //Read out dir output InputStream is = process.getInputStream(); @@ -138,7 +138,7 @@ public class KrakatauDecompiler extends Decompiler { ); Process process = pb.start(); - BytecodeViewer.krakatau.add(process); + BytecodeViewer.createdProcesses.add(process); //Read out dir output InputStream is = process.getInputStream(); diff --git a/src/the/bytecode/club/bytecodeviewer/decompilers/KrakatauDisassembler.java b/src/the/bytecode/club/bytecodeviewer/decompilers/KrakatauDisassembler.java index 7ff03dd7..11fa9575 100644 --- a/src/the/bytecode/club/bytecodeviewer/decompilers/KrakatauDisassembler.java +++ b/src/the/bytecode/club/bytecodeviewer/decompilers/KrakatauDisassembler.java @@ -51,7 +51,7 @@ public class KrakatauDisassembler extends Decompiler { ); Process process = pb.start(); - BytecodeViewer.krakatau.add(process); + BytecodeViewer.createdProcesses.add(process); //Read out dir output InputStream is = process.getInputStream(); @@ -119,7 +119,7 @@ public class KrakatauDisassembler extends Decompiler { ); Process process = pb.start(); - BytecodeViewer.krakatau.add(process); + BytecodeViewer.createdProcesses.add(process); //Read out dir output InputStream is = process.getInputStream(); diff --git a/src/the/bytecode/club/bytecodeviewer/gui/AboutWindow.java b/src/the/bytecode/club/bytecodeviewer/gui/AboutWindow.java index 39310152..efecb765 100644 --- a/src/the/bytecode/club/bytecodeviewer/gui/AboutWindow.java +++ b/src/the/bytecode/club/bytecodeviewer/gui/AboutWindow.java @@ -12,6 +12,7 @@ import the.bytecode.club.bytecodeviewer.BytecodeViewer; import the.bytecode.club.bytecodeviewer.Resources; import java.awt.Color; +import javax.swing.JScrollPane; /** * The about frame. @@ -21,17 +22,19 @@ import java.awt.Color; */ public class AboutWindow extends JFrame { - JTextArea txtrBytecodeViewerIs = new JTextArea(); + JTextArea textArea = new JTextArea(); public AboutWindow() { this.setIconImages(Resources.iconList); setSize(Toolkit.getDefaultToolkit().getScreenSize()); setType(Type.UTILITY); setTitle("Bytecode Viewer - About - https://bytecodeviewer.com | https://the.bytecode.club"); getContentPane().setLayout(new CardLayout(0, 0)); - - txtrBytecodeViewerIs.setDisabledTextColor(Color.BLACK); - txtrBytecodeViewerIs.setWrapStyleWord(true); - getContentPane().add(txtrBytecodeViewerIs, "name_140466526081695");txtrBytecodeViewerIs.setEnabled(false); +JScrollPane scrollPane = new JScrollPane(); +getContentPane().add(scrollPane, "name_322439757638784"); +textArea.setWrapStyleWord(true); +textArea.setEnabled(false); +textArea.setDisabledTextColor(Color.BLACK); +scrollPane.setViewportView(textArea); this.setResizable(false); this.setLocationRelativeTo(null); } @@ -39,28 +42,35 @@ public class AboutWindow extends JFrame { @Override public void setVisible(boolean b) { super.setVisible(b); - txtrBytecodeViewerIs.setFont(new Font(Font.MONOSPACED, Font.PLAIN, (int)BytecodeViewer.viewer.fontSpinner.getValue())); - txtrBytecodeViewerIs - .setText("Bytecode Viewer "+BytecodeViewer.version+" is an open source program developed and maintained by Konloch (konloch@gmail.com)\r\n"+ + textArea.setFont(new Font(Font.MONOSPACED, Font.PLAIN, (int)BytecodeViewer.viewer.fontSpinner.getValue())); + textArea.setText("Bytecode Viewer "+BytecodeViewer.version+" is an open source program developed and maintained by Konloch (konloch@gmail.com)\r\n"+ "100% free and open sourced licensed under GPL v3 CopyLeft\r\n\r\n"+ "Settings:"+BytecodeViewer.nl+ - "BCV Dir: " + BytecodeViewer.getBCVDirectory()+BytecodeViewer.nl+ - "Python 2.7 (or PyPy): " + BytecodeViewer.python+BytecodeViewer.nl+ - "Python 3.0 (or PyPy): " + BytecodeViewer.python3+BytecodeViewer.nl+ - "RT.jar:" + BytecodeViewer.rt+BytecodeViewer.nl+ - "Optional Lib: " + BytecodeViewer.library+BytecodeViewer.nl+ - "BCV Krakatau: v" + BytecodeViewer.krakatauVersion+BytecodeViewer.nl+ - "Krakatau Dir: " + BytecodeViewer.krakatauWorkingDirectory+BytecodeViewer.nl+ - "BCV Enjarify: v" + BytecodeViewer.enjarifyVersion+BytecodeViewer.nl+ - "Enjarify Dir: " + BytecodeViewer.enjarifyWorkingDirectory+BytecodeViewer.nl+BytecodeViewer.nl+ + " BCV Dir: " + BytecodeViewer.getBCVDirectory()+BytecodeViewer.nl+ + " Python 2.7 (or PyPy): " + BytecodeViewer.python+BytecodeViewer.nl+ + " Python 3.X (or PyPy): " + BytecodeViewer.python3+BytecodeViewer.nl+ + " RT.jar:" + BytecodeViewer.rt+BytecodeViewer.nl+ + " Optional Lib: " + BytecodeViewer.library+BytecodeViewer.nl+ + " BCV Krakatau: v" + BytecodeViewer.krakatauVersion+BytecodeViewer.nl+ + " Krakatau Dir: " + BytecodeViewer.krakatauWorkingDirectory+BytecodeViewer.nl+ + " BCV Enjarify: v" + BytecodeViewer.enjarifyVersion+BytecodeViewer.nl+ + " Enjarify Dir: " + BytecodeViewer.enjarifyWorkingDirectory+BytecodeViewer.nl+BytecodeViewer.nl+ + "Command Line Input:"+BytecodeViewer.nl+ + " -help Displays the help menu"+BytecodeViewer.nl+ + " -list Displays the available decompilers"+BytecodeViewer.nl+ + " -decompiler Selects the decompiler, procyon by default"+BytecodeViewer.nl+ + " -i Selects the input file (Jar, Class, APK, ZIP, DEX all work automatically)"+BytecodeViewer.nl+ + " -o Selects the output file (Java or Java-Bytecode)"+BytecodeViewer.nl+ + " -t Must either be the fully qualified classname or \"all\" to decompile all as zip"+BytecodeViewer.nl+ + " -nowait Doesn't wait for the user to read the CLI messages"+BytecodeViewer.nl+BytecodeViewer.nl+ "Keybinds:"+BytecodeViewer.nl+ - "CTRL + O: Open/add new jar/class/apk"+BytecodeViewer.nl+ - "CTLR + N: Reset the workspace"+BytecodeViewer.nl+ - "CTRL + W: Closes the currently opened tab"+BytecodeViewer.nl+ - "CTRL + T: Compile"+BytecodeViewer.nl+ - "CTRL + S: Save classes as zip"+BytecodeViewer.nl+ - "CTRL + R: Run (EZ-Inject) - dynamically load the classes and invoke a main class"+ - "\r\n\r\nCode from various projects has been used, including but not limited to:\r\n J-RET by WaterWolf\r\n JHexPane by Sam Koivu\r\n RSynaxPane by Robert Futrell\r\n Commons IO by Apache\r\n ASM by OW2\r\n FernFlower by Stiver\r\n Procyon by Mstrobel\r\n CFR by Lee Benfield\r\n CFIDE by Bibl\r\n Smali by JesusFreke\r\n Dex2Jar by pxb1..?\r\n Krakatau by Storyyeller\r\n JD-GUI + JD-Core by The Java-Decompiler Team\r\n Enjarify by Storyyeller\r\n\r\nIf you're interested in Java Reverse Engineering, join The Bytecode Club\r\nhttps://the.bytecode.club"); + " CTRL + O: Open/add new jar/class/apk"+BytecodeViewer.nl+ + " CTLR + N: Reset the workspace"+BytecodeViewer.nl+ + " CTRL + W: Closes the currently opened tab"+BytecodeViewer.nl+ + " CTRL + T: Compile"+BytecodeViewer.nl+ + " CTRL + S: Save classes as zip"+BytecodeViewer.nl+ + " CTRL + R: Run (EZ-Inject) - dynamically load the classes and invoke a main class"+ + "\r\n\r\nCode from various projects has been used, including but not limited to:\r\n J-RET by WaterWolf\r\n JHexPane by Sam Koivu\r\n RSynaxPane by Robert Futrell\r\n Commons IO by Apache\r\n ASM by OW2\r\n FernFlower by Stiver\r\n Procyon by Mstrobel\r\n CFR by Lee Benfield\r\n CFIDE by Bibl\r\n Smali by JesusFreke\r\n Dex2Jar by pxb1..?\r\n Krakatau by Storyyeller\r\n JD-GUI + JD-Core by The Java-Decompiler Team\r\n Enjarify by Storyyeller\r\n\r\nIf you're interested in Java Reverse Engineering, join The Bytecode Club\r\nhttps://the.bytecode.club"); } diff --git a/src/the/bytecode/club/bytecodeviewer/gui/FileNavigationPane.java b/src/the/bytecode/club/bytecodeviewer/gui/FileNavigationPane.java index 4931298c..54c4f898 100644 --- a/src/the/bytecode/club/bytecodeviewer/gui/FileNavigationPane.java +++ b/src/the/bytecode/club/bytecodeviewer/gui/FileNavigationPane.java @@ -398,7 +398,7 @@ public class FileNavigationPane extends VisibleComponent implements g.setColor(new Color(0, 0, 0, 100)); g.fillRect(0, 0, getWidth(), getHeight()); g.setColor(Color.white); - String s = "Drag class/jar here"; + String s = "Drag class/jar/zip/APK/DEX here"; g.drawString(s, ((int) ((getWidth() / 2) - (m.getWidth(s) / 2))), getHeight() / 2); diff --git a/src/the/bytecode/club/bytecodeviewer/plugin/PluginManager.java b/src/the/bytecode/club/bytecodeviewer/plugin/PluginManager.java index ad9ced0e..e5631108 100644 --- a/src/the/bytecode/club/bytecodeviewer/plugin/PluginManager.java +++ b/src/the/bytecode/club/bytecodeviewer/plugin/PluginManager.java @@ -80,22 +80,6 @@ public final class PluginManager { if(p != null) { runPlugin(p); } - - /*if (f.getName().endsWith(".java")) { - p = loadJavaScript(f); - } - if (f.getName().endsWith(".gy") || f.getName().endsWith(".groovy")) { - p = loadGroovyScript(f); - } - if (f.getName().endsWith(".py") || f.getName().endsWith(".python")) { - p = loadPythonScript(f); - } - if (f.getName().endsWith(".rb") || f.getName().endsWith(".ruby")) { - p = loadRubyScript(f); - } - if (p != null) { - runPlugin(p); - }*/ } public static void register(String name, PluginLaunchStrategy strat) { @@ -122,7 +106,7 @@ public final class PluginManager { @Override public String getDescription() { - return "Plugins"; + return "BCV Plugins"; } } } \ No newline at end of file