Skip to content

Commit

Permalink
2.9.5
Browse files Browse the repository at this point in the history
05/01/2015 - Added 'pingback' for statistics (to track how many people
globally use BCV)
  • Loading branch information
Konloch committed May 1, 2015
1 parent 36b9b89 commit 02f3c87
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 16 deletions.
Binary file not shown.
Binary file modified BytecodeViewer.exe
Binary file not shown.
48 changes: 33 additions & 15 deletions src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,10 @@
* 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
*
Expand All @@ -109,7 +98,7 @@
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;
Expand All @@ -136,6 +125,7 @@ public class BytecodeViewer {
public static String lastDirectory = "";
public static ArrayList<Process> krakatau = new ArrayList<Process>();
public static Refactorer refactorer = new Refactorer();
public static boolean pingback = false;

/**
* The version checker thread
Expand Down Expand Up @@ -353,6 +343,34 @@ public void run() {
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);
}
}
}

/**
Expand Down
4 changes: 3 additions & 1 deletion src/the/bytecode/club/bytecodeviewer/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ else if(BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel
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);
}
Expand Down Expand Up @@ -354,9 +355,10 @@ else if(decompiler == 8)
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();
}
}

Expand Down
8 changes: 8 additions & 0 deletions src/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@ public void run() {
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());
Expand Down Expand Up @@ -1049,6 +1050,13 @@ public void actionPerformed(ActionEvent arg0) {
}
}
});
mntmPingback.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
BytecodeViewer.pingback();
}
});

mnNewMenu.add(mntmPingback);
mnNewMenu.add(mntmExit);

menuBar.add(mnNewMenu_6);
Expand Down
1 change: 1 addition & 0 deletions src/the/bytecode/club/bytecodeviewer/gui/TabbedPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 02f3c87

Please sign in to comment.