diff --git a/BytecodeViewer 2.9.4.jar b/BytecodeViewer 2.9.5.jar similarity index 94% rename from BytecodeViewer 2.9.4.jar rename to BytecodeViewer 2.9.5.jar index ca19672d..af901d0e 100644 Binary files a/BytecodeViewer 2.9.4.jar and b/BytecodeViewer 2.9.5.jar differ diff --git a/BytecodeViewer.exe b/BytecodeViewer.exe index 0142c88a..a1b87565 100644 Binary files a/BytecodeViewer.exe and b/BytecodeViewer.exe differ diff --git a/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java b/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java index 9c219044..2fd9f02c 100644 --- a/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java +++ b/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java @@ -86,21 +86,10 @@ import the.bytecode.club.bytecodeviewer.obfuscators.mapping.Refactorer; * When you drag a folder, it must add the folder name not just the child into the root jtree path * add stackmapframes to bytecode decompiler * add stackmapframes remover? + * In BCV if you open a class and the name is so big, you cannot close because the [X] does not appear." * - * -----2.9.4-----: - * 04/19/2015 - Added -O to be passed for Krakatau Decompiler/Disassembler/Assembler. (Thanks Storyyeller). - * 04/19/2015 - Added -skip to be passed for Krakatau Decompiler. (Thanks Storyyeller). - * 04/19/2015 - Changed the warning window for Python to recommend PyPy. (Thanks Storyyeller). - * 04/20/2015 - Happy 2015 4/20 (Shoutout to @announce420 for being 2 years old). - * 04/21/2015 - Started reworking the View Panes. - * 04/21/2015 - Finished reworking the View Panes - http://i.imgur.com/SqIw4Vj.png - Cheers to whoever's idea this was (I forget sorry <3). - * 04/21/2015 - Updated CFR to 0_100.jar - * 04/21/2015 - Added CTRL + R for run. - * 04/21/2015 - Added CTRL + S for save files as. - * 04/21/2015 - Added CTRL + T for compile. - * 04/21/2015 - Added Krakatau optional library. - * 04/21/2015 - The about pane now provides a lot more up to date information. - * 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) * * @author Konloch * @@ -109,7 +98,7 @@ import the.bytecode.club.bytecodeviewer.obfuscators.mapping.Refactorer; public class BytecodeViewer { /*per version*/ - public static String version = "2.9.4"; + public static String version = "2.9.5"; public static String krakatauVersion = "2"; /*the rest*/ public static MainViewerGUI viewer = null; @@ -136,6 +125,7 @@ public class BytecodeViewer { public static String lastDirectory = ""; public static ArrayList krakatau = new ArrayList(); public static Refactorer refactorer = new Refactorer(); + public static boolean pingback = false; /** * The version checker thread @@ -353,6 +343,34 @@ public class BytecodeViewer { for (String s : args) { openFiles(new File[] { new File(s) }, true); } + + if(!pingback) { + pingback = true; + pingback(); + } + } + + public static void pingback() { + JOptionPane pane = new JOptionPane( + "Would you like to 'pingback' to https://bytecodeviewer.com to be counted in the global users for BCV?"); + Object[] options = new String[] { "Yes", "No" }; + pane.setOptions(options); + JDialog dialog = pane.createDialog(BytecodeViewer.viewer, + "Bytecode Viewer - Optional Pingback"); + dialog.setVisible(true); + Object obj = pane.getValue(); + int result = -1; + for (int k = 0; k < options.length; k++) + if (options[k].equals(obj)) + result = k; + + if (result == 0) { + try { + new HTTPRequest(new URL("https://bytecodeviewer.com/add.php")).read(); + } catch (Exception e) { + new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e); + } + } } /** diff --git a/src/the/bytecode/club/bytecodeviewer/Settings.java b/src/the/bytecode/club/bytecodeviewer/Settings.java index a65b0620..db1de603 100644 --- a/src/the/bytecode/club/bytecodeviewer/Settings.java +++ b/src/the/bytecode/club/bytecodeviewer/Settings.java @@ -178,6 +178,7 @@ public class Settings { DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel3Smali_E.isSelected()), false); DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.decodeAPKResources.isSelected()), false); DiskWriter.writeNewLine(BytecodeViewer.settingsName, BytecodeViewer.library, false); + DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.pingback), false); } catch(Exception e) { new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e); } @@ -354,9 +355,10 @@ public class Settings { BytecodeViewer.viewer.panel3Smali_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 105, false))); BytecodeViewer.viewer.decodeAPKResources.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 106, false))); BytecodeViewer.library = DiskReader.loadString(BytecodeViewer.settingsName, 107, false); + BytecodeViewer.pingback = Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 108, false)); } catch(Exception e) { //ignore because errors are expected, first start up and outdated settings. - e.printStackTrace(); + //e.printStackTrace(); } } diff --git a/src/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java b/src/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java index 06e1e10b..a097560c 100644 --- a/src/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java +++ b/src/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java @@ -486,6 +486,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier { public final ButtonGroup panelGroup2 = new ButtonGroup(); public final ButtonGroup panelGroup3 = new ButtonGroup(); private final JMenuItem mntmSetOpitonalLibrary = new JMenuItem("Set Optionial Library Folder"); + private final JMenuItem mntmPingback = new JMenuItem("Pingback"); public MainViewerGUI() { mnNewMenu_5.setVisible(false); KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new Test()); @@ -1049,6 +1050,13 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier { } } }); + mntmPingback.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent arg0) { + BytecodeViewer.pingback(); + } + }); + + mnNewMenu.add(mntmPingback); mnNewMenu.add(mntmExit); menuBar.add(mnNewMenu_6); diff --git a/src/the/bytecode/club/bytecodeviewer/gui/TabbedPane.java b/src/the/bytecode/club/bytecodeviewer/gui/TabbedPane.java index 820944bf..55095fb7 100644 --- a/src/the/bytecode/club/bytecodeviewer/gui/TabbedPane.java +++ b/src/the/bytecode/club/bytecodeviewer/gui/TabbedPane.java @@ -41,6 +41,7 @@ public class TabbedPane extends JPanel { public TabbedPane(String name, final JTabbedPane pane) { // unset default FlowLayout' gaps super(new FlowLayout(FlowLayout.LEFT, 0, 0)); + if (pane == null) throw new NullPointerException("TabbedPane is null");