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'.
This commit is contained in:
Konloch 2015-04-28 06:32:58 -06:00
parent a38032a346
commit c0fee4ed33
14 changed files with 749 additions and 356 deletions

Binary file not shown.

View file

@ -333,4 +333,18 @@ Changelog:
02/28/2015 - Added resource refreshing.
02/28/2015 - Im Frizzy started working on Obfuscation.
03/20/2015 - Updated Dex2Jar to 2.0.
03/20/2015 - Updated CFR to 0_98.jar
03/20/2015 - Updated CFR to 0_98.jar
-----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'.

BIN
libs/jd-gui-1.0.0-RC4.jar Normal file

Binary file not shown.

View file

@ -34,6 +34,7 @@ import the.bytecode.club.bytecodeviewer.api.ClassNodeLoader;
import the.bytecode.club.bytecodeviewer.gui.ClassViewer;
import the.bytecode.club.bytecodeviewer.gui.FileNavigationPane;
import the.bytecode.club.bytecodeviewer.gui.MainViewerGUI;
import the.bytecode.club.bytecodeviewer.gui.RunOptions;
import the.bytecode.club.bytecodeviewer.gui.SearchingPane;
import the.bytecode.club.bytecodeviewer.gui.SystemErrConsole;
import the.bytecode.club.bytecodeviewer.gui.WorkPane;
@ -83,21 +84,23 @@ import the.bytecode.club.bytecodeviewer.obfuscators.mapping.Refactorer;
* fix the randomly sometimes fucked up names on file navigation bug
* make zipfile not include the decode shit
* When you drag a folder, it must add the folder name not just the child into the root jtree path
* add ctrl + r for run
* add ctrl + t for compile
* add stackmapframes to bytecode decompiler
* add stackmapframes remover?
*
* -----2.9.3-----:
* 02/28/2015 - Added drag and drop for any file.
* 02/28/2015 - Added ctrl + w to close the current opened tab.
* 02/28/2015 - Updated to CFR 0_97.jar
* 02/28/2015 - Fixed a concurrency issue with the decompilers.
* 02/28/2015 - Added image resize via scroll on mouse.
* 02/28/2015 - Added resource refreshing.
* 02/28/2015 - Im Frizzy started working on Obfuscation.
* 03/20/2015 - Updated Dex2Jar to 2.0.
* 03/20/2015 - Updated CFR to 0_98.jar
* -----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'.
*
* @author Konloch
*
@ -106,13 +109,14 @@ import the.bytecode.club.bytecodeviewer.obfuscators.mapping.Refactorer;
public class BytecodeViewer {
/*per version*/
public static String version = "2.9.3";
public static String version = "2.9.4";
public static String krakatauVersion = "2";
/*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.
public static String python = "";
public static String rt = "";
public static String library = "";
public static SecurityMan sm = new SecurityMan();
public static HashMap<String, ClassNode> loadedClasses = new HashMap<String, ClassNode>();
public static HashMap<String, byte[]> loadedResources = new HashMap<String, byte[]>();
@ -919,6 +923,69 @@ public class BytecodeViewer {
} else if ((e.getKeyCode() == KeyEvent.VK_N) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
last = System.currentTimeMillis();
BytecodeViewer.resetWorkSpace(true);
} else if ((e.getKeyCode() == KeyEvent.VK_T) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
last = System.currentTimeMillis();
BytecodeViewer.compile(true);
} else if ((e.getKeyCode() == KeyEvent.VK_R) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
last = System.currentTimeMillis();
if(BytecodeViewer.getLoadedClasses().isEmpty()) {
BytecodeViewer.showMessage("First open a class, jar, zip, apk or dex file.");
return;
}
new RunOptions().setVisible(true);
} else if ((e.getKeyCode() == KeyEvent.VK_S) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
last = System.currentTimeMillis();
if(BytecodeViewer.getLoadedClasses().isEmpty()) {
BytecodeViewer.showMessage("First open a class, jar, zip, apk or dex file.");
return;
}
if(viewer.autoCompileSmali.isSelected() && !BytecodeViewer.compile(false))
return;
JFileChooser fc = new JFileChooser();
fc.setFileFilter(viewer.new ZipFileFilter());
fc.setFileHidingEnabled(false);
fc.setAcceptAllFileFilterUsed(false);
int returnVal = fc.showSaveDialog(viewer);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
if(!file.getAbsolutePath().endsWith(".zip"))
file = new File(file.getAbsolutePath()+".zip");
if(file.exists()) {
JOptionPane pane = new JOptionPane(
"Are you sure you wish to overwrite this existing file?");
Object[] options = new String[] { "Yes", "No" };
pane.setOptions(options);
JDialog dialog = pane.createDialog(BytecodeViewer.viewer,
"Bytecode Viewer - Overwrite File");
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) {
file.delete();
} else {
return;
}
}
final File file2 = file;
BytecodeViewer.viewer.setIcon(true);
Thread t = new Thread() {
@Override
public void run() {
JarUtils.saveAsJar(BytecodeViewer.getLoadedClasses(),
file2.getAbsolutePath());
BytecodeViewer.viewer.setIcon(false);
}
};
t.start();
}
} else if ((e.getKeyCode() == KeyEvent.VK_W) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
last = System.currentTimeMillis();
if(viewer.workPane.getCurrentViewer() != null)

View file

@ -113,7 +113,7 @@ public class Settings {
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "6", false);
else if(BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1Krakatau.getModel()))
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "7", false);
else if(BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1KrakatauEditable.getModel()))
else if(BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1KrakatauBytecode.getModel()))
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "8", false);
if(BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2None.getModel()))
@ -132,7 +132,7 @@ public class Settings {
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "6", false);
else if(BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2Krakatau.getModel()))
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "7", false);
else if(BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2KrakatauEditable.getModel()))
else if(BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2KrakatauBytecode.getModel()))
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "8", false);
if(BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel3None.getModel()))
@ -151,7 +151,7 @@ public class Settings {
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "6", false);
else if(BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel3Krakatau.getModel()))
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "7", false);
else if(BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel3KrakatauEditable.getModel()))
else if(BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel3KrakatauBytecode.getModel()))
DiskWriter.writeNewLine(BytecodeViewer.settingsName, "8", false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.refreshOnChange.isSelected()), false);
@ -161,10 +161,23 @@ public class Settings {
DiskWriter.writeNewLine(BytecodeViewer.settingsName, BytecodeViewer.lastDirectory, false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, BytecodeViewer.python, false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, BytecodeViewer.rt, false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.pane1Editable.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.pane2Editable.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.pane3Editable.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel1Proc_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel1CFR_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel1Fern_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel1Krakatau_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel1Smali_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel2Proc_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel2CFR_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel2Fern_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel2Krakatau_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel2Smali_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel3Proc_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel3CFR_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel3Fern_E.isSelected()), false);
DiskWriter.writeNewLine(BytecodeViewer.settingsName, String.valueOf(BytecodeViewer.viewer.panel3Krakatau_E.isSelected()), false);
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);
} catch(Exception e) {
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
}
@ -270,7 +283,7 @@ public class Settings {
else if(decompiler == 7)
BytecodeViewer.viewer.panelGroup1.setSelected(BytecodeViewer.viewer.panel1Krakatau.getModel(), true);
else if(decompiler == 8)
BytecodeViewer.viewer.panelGroup1.setSelected(BytecodeViewer.viewer.panel1KrakatauEditable.getModel(), true);
BytecodeViewer.viewer.panelGroup1.setSelected(BytecodeViewer.viewer.panel1KrakatauBytecode.getModel(), true);
decompiler = Integer.parseInt(DiskReader.loadString(BytecodeViewer.settingsName, 82, false));
if(decompiler == 0)
@ -290,7 +303,7 @@ public class Settings {
else if(decompiler == 7)
BytecodeViewer.viewer.panelGroup2.setSelected(BytecodeViewer.viewer.panel2Krakatau.getModel(), true);
else if(decompiler == 8)
BytecodeViewer.viewer.panelGroup2.setSelected(BytecodeViewer.viewer.panel2KrakatauEditable.getModel(), true);
BytecodeViewer.viewer.panelGroup2.setSelected(BytecodeViewer.viewer.panel2KrakatauBytecode.getModel(), true);
decompiler = Integer.parseInt(DiskReader.loadString(BytecodeViewer.settingsName, 83, false));
if(decompiler == 0)
@ -310,7 +323,7 @@ public class Settings {
else if(decompiler == 7)
BytecodeViewer.viewer.panelGroup3.setSelected(BytecodeViewer.viewer.panel3Krakatau.getModel(), true);
else if(decompiler == 8)
BytecodeViewer.viewer.panelGroup3.setSelected(BytecodeViewer.viewer.panel3KrakatauEditable.getModel(), true);
BytecodeViewer.viewer.panelGroup3.setSelected(BytecodeViewer.viewer.panel3KrakatauBytecode.getModel(), true);
BytecodeViewer.viewer.refreshOnChange.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 84, false)));
@ -324,12 +337,26 @@ public class Settings {
BytecodeViewer.lastDirectory = DiskReader.loadString(BytecodeViewer.settingsName, 88, false);
BytecodeViewer.python = DiskReader.loadString(BytecodeViewer.settingsName, 89, false);
BytecodeViewer.rt = DiskReader.loadString(BytecodeViewer.settingsName, 90, false);
BytecodeViewer.viewer.pane1Editable.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 91, false)));
BytecodeViewer.viewer.pane2Editable.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 92, false)));
BytecodeViewer.viewer.pane3Editable.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 93, false)));
BytecodeViewer.viewer.decodeAPKResources.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 94, false)));
BytecodeViewer.viewer.panel1Proc_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 91, false)));
BytecodeViewer.viewer.panel1CFR_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 92, false)));
BytecodeViewer.viewer.panel1Fern_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 93, false)));
BytecodeViewer.viewer.panel1Krakatau_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 94, false)));
BytecodeViewer.viewer.panel1Smali_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 95, false)));
BytecodeViewer.viewer.panel2Proc_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 96, false)));
BytecodeViewer.viewer.panel2CFR_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 97, false)));
BytecodeViewer.viewer.panel2Fern_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 98, false)));
BytecodeViewer.viewer.panel2Krakatau_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 99, false)));
BytecodeViewer.viewer.panel2Smali_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 100, false)));
BytecodeViewer.viewer.panel3Proc_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 101, false)));
BytecodeViewer.viewer.panel3CFR_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 101, false)));
BytecodeViewer.viewer.panel3Fern_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 103, false)));
BytecodeViewer.viewer.panel3Krakatau_E.setSelected(Boolean.parseBoolean(DiskReader.loadString(BytecodeViewer.settingsName, 104, false)));
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);
} catch(Exception e) {
//ignore because errors are expected, first start up and outdated settings.
e.printStackTrace();
}
}

View file

@ -21,7 +21,7 @@ public class KrakatauAssembler extends Compiler {
@Override
public byte[] compile(String contents, String name) {
if(BytecodeViewer.python.equals("")) {
BytecodeViewer.showMessage("You need to set your Python 2.7 executable path.");
BytecodeViewer.showMessage("You need to set your Python (or PyPy for speed) 2.7 executable path.");
BytecodeViewer.viewer.pythonC();
}
@ -46,6 +46,7 @@ public class KrakatauAssembler extends Compiler {
try {
ProcessBuilder pb = new ProcessBuilder(
BytecodeViewer.python,
"-O", //love you storyyeller <3
BytecodeViewer.krakatauWorkingDirectory + BytecodeViewer.fs + "assemble.py",
"-out",
tempDirectory.getAbsolutePath(),

View file

@ -0,0 +1,91 @@
package the.bytecode.club.bytecodeviewer.decompilers;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.zip.ZipException;
import java.util.zip.ZipOutputStream;
import me.konloch.kontainer.io.DiskWriter;
import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.ClassNode;
import com.strobel.core.StringUtilities;
import com.strobel.decompiler.DecompilationOptions;
import com.strobel.decompiler.DecompilerSettings;
import com.strobel.decompiler.PlainTextOutput;
import com.strobel.decompiler.languages.java.JavaFormattingOptions;
import com.strobel.assembler.InputTypeLoader;
import com.strobel.assembler.metadata.Buffer;
import com.strobel.assembler.metadata.ITypeLoader;
import com.strobel.assembler.metadata.JarTypeLoader;
import com.strobel.assembler.metadata.MetadataSystem;
import com.strobel.assembler.metadata.TypeDefinition;
import com.strobel.assembler.metadata.TypeReference;
import the.bytecode.club.bytecodeviewer.BytecodeViewer;
import the.bytecode.club.bytecodeviewer.JarUtils;
import the.bytecode.club.bytecodeviewer.MiscUtils;
/**
* JDCore Decompiler Wrapper
*
* @author Konloch
*
*/
public class JDCoreDecompiler extends Decompiler {
@Override
public void decompileToClass(String className, String classNameSaved) {
ClassNode cn = BytecodeViewer.getClassNode(className);
final ClassWriter cw = new ClassWriter(0);
try {
cn.accept(cw);
} catch(Exception e) {
e.printStackTrace();
try {
Thread.sleep(200);
cn.accept(cw);
} catch (InterruptedException e1) { }
}
String contents = decompileClassNode(cn, cw.toByteArray());
DiskWriter.replaceFile(classNameSaved, contents, false);
}
@Override
public String decompileClassNode(ClassNode cn, byte[] b) {
String exception = "";
try {
String decompiledSource = "dicks WIP";
return decompiledSource;
} catch (Exception e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
e.printStackTrace();
exception = "Bytecode Viewer Version: " + BytecodeViewer.version + BytecodeViewer.nl + BytecodeViewer.nl + sw.toString();
}
return "Procyon error! Send the stacktrace to Konloch at http://the.bytecode.club or konloch@gmail.com"+BytecodeViewer.nl+BytecodeViewer.nl+"Suggested Fix: Click refresh class, if it fails again try another decompiler."+BytecodeViewer.nl+BytecodeViewer.nl+exception;
}
@Override
public void decompileToZip(String zipName) {
}
}

View file

@ -25,10 +25,17 @@ import the.bytecode.club.bytecodeviewer.ZipUtils;
public class KrakatauDecompiler extends Decompiler {
public String quick() {
if(BytecodeViewer.library.isEmpty())
return "";
else
return ";"+BytecodeViewer.library;
}
public String decompileClassNode(ClassNode cn, byte[] b) {
if(BytecodeViewer.python.equals("")) {
BytecodeViewer.showMessage("You need to set your Python 2.7 executable path.");
BytecodeViewer.showMessage("You need to set your Python (or PyPy for speed) 2.7 executable path.");
BytecodeViewer.viewer.pythonC();
}
if(BytecodeViewer.rt.equals("")) {
@ -46,10 +53,12 @@ public class KrakatauDecompiler extends Decompiler {
try {
ProcessBuilder pb = new ProcessBuilder(
BytecodeViewer.python,
"-O", //love you storyyeller <3
BytecodeViewer.krakatauWorkingDirectory + BytecodeViewer.fs + "decompile.py",
"-skip", //love you storyyeller <3
"-nauto",
"-path",
BytecodeViewer.rt+";"+tempJar.getAbsolutePath(),
BytecodeViewer.rt+";"+tempJar.getAbsolutePath()+quick(),
"-out",
tempDirectory.getAbsolutePath(),
cn.name+".class"
@ -100,7 +109,7 @@ public class KrakatauDecompiler extends Decompiler {
public void decompileToZip(String zipName) {
if(BytecodeViewer.python.equals("")) {
BytecodeViewer.showMessage("You need to set your Python 2.7 executable path.");
BytecodeViewer.showMessage("You need to set your Python (or PyPy for speed) 2.7 executable path.");
BytecodeViewer.viewer.pythonC();
}
if(BytecodeViewer.rt.equals("")) {
@ -118,6 +127,7 @@ public class KrakatauDecompiler extends Decompiler {
try {
ProcessBuilder pb = new ProcessBuilder(
BytecodeViewer.python,
"-O", //love you storyyeller <3
BytecodeViewer.krakatauWorkingDirectory + BytecodeViewer.fs + "decompile.py",
"-nauto",
"-path",
@ -164,7 +174,7 @@ public class KrakatauDecompiler extends Decompiler {
public void decompileToClass(String className, String classNameSaved) {
if(BytecodeViewer.python.equals("")) {
BytecodeViewer.showMessage("You need to set your Python 2.7 executable path.");
BytecodeViewer.showMessage("You need to set your Python (or PyPy for speed) 2.7 executable path.");
BytecodeViewer.viewer.pythonC();
}
if(BytecodeViewer.rt.equals("")) {
@ -181,6 +191,7 @@ public class KrakatauDecompiler extends Decompiler {
try {
ProcessBuilder pb = new ProcessBuilder(
BytecodeViewer.python,
"-O", //love you storyyeller <3
BytecodeViewer.krakatauWorkingDirectory + BytecodeViewer.fs + "decompile.py",
"-nauto",
"-path",

View file

@ -26,7 +26,7 @@ public class KrakatauDisassembler extends Decompiler {
public String decompileClassNode(ClassNode cn, byte[] b) {
if(BytecodeViewer.python.equals("")) {
BytecodeViewer.showMessage("You need to set your Python 2.7 executable path.");
BytecodeViewer.showMessage("You need to set your Python (or PyPy for speed) 2.7 executable path.");
BytecodeViewer.viewer.pythonC();
}
String s = "Bytecode Viewer Version: " + BytecodeViewer.version + BytecodeViewer.nl + BytecodeViewer.nl + "Please send this to konloch@gmail.com. " + BytecodeViewer.nl + BytecodeViewer.nl;
@ -40,6 +40,7 @@ public class KrakatauDisassembler extends Decompiler {
try {
ProcessBuilder pb = new ProcessBuilder(
BytecodeViewer.python,
"-O", //love you storyyeller <3
BytecodeViewer.krakatauWorkingDirectory + BytecodeViewer.fs + "disassemble.py",
"-path",
tempJar.getAbsolutePath(),

View file

@ -2,8 +2,8 @@ package the.bytecode.club.bytecodeviewer.gui;
import javax.swing.JFrame;
import java.awt.Dimension;
import java.awt.CardLayout;
import java.awt.Toolkit;
import javax.swing.JTextArea;
@ -20,23 +20,43 @@ import java.awt.Color;
*/
public class AboutWindow extends JFrame {
JTextArea txtrBytecodeViewerIs = new JTextArea();
public AboutWindow() {
this.setIconImages(Resources.iconList);
setSize(new Dimension(446, 434));
setSize(Toolkit.getDefaultToolkit().getScreenSize());
setType(Type.UTILITY);
setTitle("Bytecode Viewer - About");
setTitle("Bytecode Viewer - About - https://bytecodeviewer.com | https://the.bytecode.club");
getContentPane().setLayout(new CardLayout(0, 0));
JTextArea txtrBytecodeViewerIs = new JTextArea();
txtrBytecodeViewerIs.setDisabledTextColor(Color.BLACK);
txtrBytecodeViewerIs.setWrapStyleWord(true);
getContentPane().add(txtrBytecodeViewerIs, "name_140466526081695");
txtrBytecodeViewerIs
.setText("Bytecode Viewer "+BytecodeViewer.version+" is an open source program\r\ndeveloped by Konloch (konloch@gmail.com)\r\nDir: C:\\Users\\null\\.Bytecode-Viewer\r\n\r\nIt uses code from the following:\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\r\nIf you're interested in Java Reverse\r\nEngineering, join The Bytecode Club\r\nhttps://the.bytecode.club");
txtrBytecodeViewerIs.setEnabled(false);
getContentPane().add(txtrBytecodeViewerIs, "name_140466526081695");txtrBytecodeViewerIs.setEnabled(false);
this.setResizable(false);
this.setLocationRelativeTo(null);
}
@Override
public void setVisible(boolean b) {
super.setVisible(b);
txtrBytecodeViewerIs
.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 CopyLef\r\n\r\n"+
"Settings:"+BytecodeViewer.nl+
"BCV Dir: " + BytecodeViewer.getBCVDirectory()+BytecodeViewer.nl+
"Python: " + BytecodeViewer.python+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+BytecodeViewer.nl+
"Keybinds:"+BytecodeViewer.nl+
"CTRL + O: Open/add new jar/class/apk"+BytecodeViewer.nl+
"CTLR + N: Reset the workspace"+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\nIt uses code from the following:\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\r\nIf you're interested in Java Reverse Engineering, join The Bytecode Club\r\nhttps://the.bytecode.club");
}
private static final long serialVersionUID = -8230501978224923296L;

View file

@ -56,7 +56,120 @@ import the.bytecode.club.bytecodeviewer.decompilers.Decompiler;
*/
public class ClassViewer extends Viewer {
public void setPanes() {
if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1None.getModel()))
pane1 = 0;
else if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1Proc.getModel()))
pane1 = 1;
else if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1CFR.getModel()))
pane1 = 2;
else if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1Fern.getModel()))
pane1 = 3;
else if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1Bytecode.getModel()))
pane1 = 4;
else if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1Hexcode.getModel()))
pane1 = 5;
else if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1Smali.getModel()))
pane1 = 6;
else if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1Krakatau.getModel()))
pane1 = 7;
else if (BytecodeViewer.viewer.panelGroup1.isSelected(BytecodeViewer.viewer.panel1KrakatauBytecode.getModel()))
pane1 = 8;
if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2None.getModel()))
pane2 = 0;
else if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2Proc.getModel()))
pane2 = 1;
else if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2CFR.getModel()))
pane2 = 2;
else if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2Fern.getModel()))
pane2 = 3;
else if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2Bytecode.getModel()))
pane2 = 4;
else if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2Hexcode.getModel()))
pane2 = 5;
else if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2Smali.getModel()))
pane2 = 6;
else if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2Krakatau.getModel()))
pane2 = 7;
else if (BytecodeViewer.viewer.panelGroup2.isSelected(BytecodeViewer.viewer.panel2KrakatauBytecode.getModel()))
pane2 = 8;
if (BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel3None.getModel()))
pane3 = 0;
else if (BytecodeViewer.viewer.panelGroup3.isSelected(BytecodeViewer.viewer.panel3Proc.getModel()))
pane3 = 1;
else if (BytecodeViewer.viewer.panelGroup3 .isSelected(BytecodeViewer.viewer.panel3CFR.getModel()))
pane3 = 2;
else if (BytecodeViewer.viewer.panelGroup3 .isSelected(BytecodeViewer.viewer.panel3Fern.getModel()))
pane3 = 3;
else if (BytecodeViewer.viewer.panelGroup3 .isSelected(BytecodeViewer.viewer.panel3Bytecode.getModel()))
pane3 = 4;
else if (BytecodeViewer.viewer.panelGroup3 .isSelected(BytecodeViewer.viewer.panel3Hexcode.getModel()))
pane3 = 5;
else if (BytecodeViewer.viewer.panelGroup3 .isSelected(BytecodeViewer.viewer.panel3Smali.getModel()))
pane3 = 6;
else if (BytecodeViewer.viewer.panelGroup3 .isSelected(BytecodeViewer.viewer.panel3Krakatau.getModel()))
pane3 = 7;
else if (BytecodeViewer.viewer.panelGroup3 .isSelected(BytecodeViewer.viewer.panel3KrakatauBytecode.getModel()))
pane3 = 8;
}
public boolean isPanel1Editable() {
setPanes();
if(pane1 == 1 && BytecodeViewer.viewer.panel1Proc_E.isSelected())
return true;
if(pane1 == 2 && BytecodeViewer.viewer.panel1CFR_E.isSelected())
return true;
if(pane1 == 3 && BytecodeViewer.viewer.panel1Fern_E.isSelected())
return true;
if(pane1 == 6 && BytecodeViewer.viewer.panel1Smali_E.isSelected())
return true;
if((pane1 == 7 || pane1 == 8) && BytecodeViewer.viewer.panel1Krakatau_E.isSelected())
return true;
return false;
}
public boolean isPanel2Editable() {
setPanes();
if(pane2 == 1 && BytecodeViewer.viewer.panel2Proc_E.isSelected())
return true;
if(pane2 == 2 && BytecodeViewer.viewer.panel2CFR_E.isSelected())
return true;
if(pane2 == 3 && BytecodeViewer.viewer.panel2Fern_E.isSelected())
return true;
if(pane2 == 6 && BytecodeViewer.viewer.panel2Smali_E.isSelected())
return true;
if((pane2 == 7 || pane2 == 8) && BytecodeViewer.viewer.panel2Krakatau_E.isSelected())
return true;
return false;
}
public boolean isPanel3Editable() {
setPanes();
if(pane3 == 1 && BytecodeViewer.viewer.panel3Proc_E.isSelected())
return true;
if(pane3 == 2 && BytecodeViewer.viewer.panel3CFR_E.isSelected())
return true;
if(pane3 == 3 && BytecodeViewer.viewer.panel3Fern_E.isSelected())
return true;
if(pane3 == 6 && BytecodeViewer.viewer.panel3Smali_E.isSelected())
return true;
if((pane3 == 7 || pane3 == 8) && BytecodeViewer.viewer.panel3Krakatau_E.isSelected())
return true;
return false;
}
/**
* Whoever wrote this function, THANK YOU!
*
@ -443,89 +556,7 @@ public class ClassViewer extends Viewer {
public void startPaneUpdater(final JButton button) {
this.cn = BytecodeViewer.getClassNode(cn.name); //update the classnode
if (BytecodeViewer.viewer.panelGroup1
.isSelected(BytecodeViewer.viewer.panel1None.getModel()))
pane1 = 0;
else if (BytecodeViewer.viewer.panelGroup1
.isSelected(BytecodeViewer.viewer.panel1Proc.getModel()))
pane1 = 1;
else if (BytecodeViewer.viewer.panelGroup1
.isSelected(BytecodeViewer.viewer.panel1CFR.getModel()))
pane1 = 2;
else if (BytecodeViewer.viewer.panelGroup1
.isSelected(BytecodeViewer.viewer.panel1Fern.getModel()))
pane1 = 3;
else if (BytecodeViewer.viewer.panelGroup1
.isSelected(BytecodeViewer.viewer.panel1Bytecode.getModel()))
pane1 = 4;
else if (BytecodeViewer.viewer.panelGroup1
.isSelected(BytecodeViewer.viewer.panel1Hexcode.getModel()))
pane1 = 5;
else if (BytecodeViewer.viewer.panelGroup1
.isSelected(BytecodeViewer.viewer.panel1Smali.getModel()))
pane1 = 6;
else if (BytecodeViewer.viewer.panelGroup1
.isSelected(BytecodeViewer.viewer.panel1Krakatau.getModel()))
pane1 = 7;
else if (BytecodeViewer.viewer.panelGroup1
.isSelected(BytecodeViewer.viewer.panel1KrakatauEditable.getModel()))
pane1 = 8;
if (BytecodeViewer.viewer.panelGroup2
.isSelected(BytecodeViewer.viewer.panel2None.getModel()))
pane2 = 0;
else if (BytecodeViewer.viewer.panelGroup2
.isSelected(BytecodeViewer.viewer.panel2Proc.getModel()))
pane2 = 1;
else if (BytecodeViewer.viewer.panelGroup2
.isSelected(BytecodeViewer.viewer.panel2CFR.getModel()))
pane2 = 2;
else if (BytecodeViewer.viewer.panelGroup2
.isSelected(BytecodeViewer.viewer.panel2Fern.getModel()))
pane2 = 3;
else if (BytecodeViewer.viewer.panelGroup2
.isSelected(BytecodeViewer.viewer.panel2Bytecode.getModel()))
pane2 = 4;
else if (BytecodeViewer.viewer.panelGroup2
.isSelected(BytecodeViewer.viewer.panel2Hexcode.getModel()))
pane2 = 5;
else if (BytecodeViewer.viewer.panelGroup2
.isSelected(BytecodeViewer.viewer.panel2Smali.getModel()))
pane2 = 6;
else if (BytecodeViewer.viewer.panelGroup2
.isSelected(BytecodeViewer.viewer.panel2Krakatau.getModel()))
pane2 = 7;
else if (BytecodeViewer.viewer.panelGroup2
.isSelected(BytecodeViewer.viewer.panel2KrakatauEditable.getModel()))
pane2 = 8;
if (BytecodeViewer.viewer.panelGroup3
.isSelected(BytecodeViewer.viewer.panel3None.getModel()))
pane3 = 0;
else if (BytecodeViewer.viewer.panelGroup3
.isSelected(BytecodeViewer.viewer.panel3Proc.getModel()))
pane3 = 1;
else if (BytecodeViewer.viewer.panelGroup3
.isSelected(BytecodeViewer.viewer.panel3CFR.getModel()))
pane3 = 2;
else if (BytecodeViewer.viewer.panelGroup3
.isSelected(BytecodeViewer.viewer.panel3Fern.getModel()))
pane3 = 3;
else if (BytecodeViewer.viewer.panelGroup3
.isSelected(BytecodeViewer.viewer.panel3Bytecode.getModel()))
pane3 = 4;
else if (BytecodeViewer.viewer.panelGroup3
.isSelected(BytecodeViewer.viewer.panel3Hexcode.getModel()))
pane3 = 5;
else if (BytecodeViewer.viewer.panelGroup3
.isSelected(BytecodeViewer.viewer.panel3Smali.getModel()))
pane3 = 6;
else if (BytecodeViewer.viewer.panelGroup3
.isSelected(BytecodeViewer.viewer.panel3Krakatau.getModel()))
pane3 = 7;
else if (BytecodeViewer.viewer.panelGroup3
.isSelected(BytecodeViewer.viewer.panel3KrakatauEditable.getModel()))
pane3 = 8;
setPanes();
panel1.removeAll();
panel2.removeAll();
@ -568,7 +599,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.procyon.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane1Editable.isSelected());
panelArea.setEditable(isPanel1Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
@ -593,7 +624,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.cfr.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane1Editable.isSelected());
panelArea.setEditable(isPanel1Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -618,7 +649,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.fernflower.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane1Editable.isSelected());
panelArea.setEditable(isPanel1Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -676,7 +707,7 @@ public class ClassViewer extends Viewer {
panelArea);
panelArea.setText(Decompiler.smali.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane1Editable.isSelected());
panelArea.setEditable(isPanel1Editable());
smali1 = panelArea;
smali1.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
@ -702,7 +733,7 @@ public class ClassViewer extends Viewer {
panelArea);
panelArea.setText(Decompiler.krakatau.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane1Editable.isSelected());
panelArea.setEditable(isPanel1Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -730,7 +761,7 @@ public class ClassViewer extends Viewer {
panelArea);
panelArea.setText(Decompiler.krakatauDA.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane1Editable.isSelected());
panelArea.setEditable(isPanel1Editable());
krakatau1 = panelArea;
krakatau1.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
@ -770,7 +801,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.procyon.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane2Editable.isSelected());
panelArea.setEditable(isPanel2Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -795,7 +826,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.cfr.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane2Editable.isSelected());
panelArea.setEditable(isPanel2Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -820,7 +851,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.fernflower.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane2Editable.isSelected());
panelArea.setEditable(isPanel2Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -874,7 +905,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.smali.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane2Editable.isSelected());
panelArea.setEditable(isPanel2Editable());
smali2 = panelArea;
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
@ -900,7 +931,7 @@ public class ClassViewer extends Viewer {
panelArea);
panelArea.setText(Decompiler.krakatau.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane2Editable.isSelected());
panelArea.setEditable(isPanel2Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -926,7 +957,7 @@ public class ClassViewer extends Viewer {
panelArea);
panelArea.setText(Decompiler.krakatauDA.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane2Editable.isSelected());
panelArea.setEditable(isPanel2Editable());
krakatau2 = panelArea;
krakatau2.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
@ -967,7 +998,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.procyon.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane3Editable.isSelected());
panelArea.setEditable(isPanel3Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -992,7 +1023,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.cfr.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane3Editable.isSelected());
panelArea.setEditable(isPanel3Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -1017,7 +1048,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.fernflower.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane3Editable.isSelected());
panelArea.setEditable(isPanel3Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -1071,7 +1102,7 @@ public class ClassViewer extends Viewer {
RTextScrollPane scrollPane = new RTextScrollPane(panelArea);
panelArea.setText(Decompiler.smali.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane3Editable.isSelected());
panelArea.setEditable(isPanel3Editable());
smali3 = panelArea;
smali3.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
@ -1097,7 +1128,7 @@ public class ClassViewer extends Viewer {
panelArea);
panelArea.setText(Decompiler.krakatau.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane3Editable.isSelected());
panelArea.setEditable(isPanel3Editable());
panelArea.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {
if ((e.getKeyCode() == KeyEvent.VK_F) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) {
@ -1125,7 +1156,7 @@ public class ClassViewer extends Viewer {
panelArea);
panelArea.setText(Decompiler.krakatauDA.decompileClassNode(cn,b));
panelArea.setCaretPosition(0);
panelArea.setEditable(BytecodeViewer.viewer.pane3Editable.isSelected());
panelArea.setEditable(isPanel3Editable());
krakatau3 = panelArea;
krakatau3.addKeyListener(new KeyListener() {
public void keyPressed(KeyEvent e) {

View file

@ -50,7 +50,6 @@ import java.io.File;
import java.util.ArrayList;
import javax.swing.JRadioButtonMenuItem;
import javax.swing.SwingConstants;
/**
* The main file for the GUI.n
@ -76,6 +75,23 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
}
}
public void library() {
JFileChooser fc = new JFileChooser();
fc.setFileFilter(new LibraryFileFilter());
fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
fc.setFileHidingEnabled(false);
fc.setAcceptAllFileFilterUsed(false);
int returnVal = fc.showOpenDialog(BytecodeViewer.viewer);
if (returnVal == JFileChooser.APPROVE_OPTION)
try {
BytecodeViewer.library = fc.getSelectedFile().getAbsolutePath();
} catch (Exception e1) {
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e1);
}
}
public void rtC() {
JFileChooser fc = new JFileChooser();
fc.setFileFilter(new RTCFileFilter());
@ -96,10 +112,10 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
final Decompiler cfr_dc = new CFRDecompiler();
final Decompiler krak_dc = new KrakatauDecompiler();
private static final long serialVersionUID = 1851409230530948543L;
public static final long serialVersionUID = 1851409230530948543L;
public JCheckBoxMenuItem debugHelpers = new JCheckBoxMenuItem("Debug Helpers");
private JSplitPane sp1;
private JSplitPane sp2;
public JSplitPane sp1;
public JSplitPane sp2;
static ArrayList<VisibleComponent> rfComps = new ArrayList<VisibleComponent>();
public JCheckBoxMenuItem rbr = new JCheckBoxMenuItem("Hide bridge methods");
public JCheckBoxMenuItem rsy = new JCheckBoxMenuItem(
@ -135,36 +151,36 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
"Deinline finally structures");
public JCheckBoxMenuItem asc = new JCheckBoxMenuItem(
"Allow only ASCII characters in strings");
private final JMenuItem mntmNewWorkspace = new JMenuItem("New Workspace");
public final JMenuItem mntmNewWorkspace = new JMenuItem("New Workspace");
public JMenu mnRecentFiles = new JMenu("Recent Files");
private final JMenuItem mntmNewMenuItem = new JMenuItem(
public final JMenuItem mntmNewMenuItem = new JMenuItem(
"Save Java Files As..");
private final JMenuItem mntmAbout = new JMenuItem("About");
private AboutWindow aboutWindow = new AboutWindow();
private final JSeparator separator_3 = new JSeparator();
private final JMenu mnNewMenu_1 = new JMenu("Plugins");
private final JMenuItem mntmStartExternalPlugin = new JMenuItem(
public final JMenuItem mntmAbout = new JMenuItem("About");
public AboutWindow aboutWindow = new AboutWindow();
public final JSeparator separator_3 = new JSeparator();
public final JMenu mnNewMenu_1 = new JMenu("Plugins");
public final JMenuItem mntmStartExternalPlugin = new JMenuItem(
"Open Plugin..");
private final JSeparator separator_4 = new JSeparator();
public final JSeparator separator_4 = new JSeparator();
public JMenu mnRecentPlugins = new JMenu("Recent Plugins");
private final JSeparator separator_5 = new JSeparator();
private final JMenuItem mntmStartZkmString = new JMenuItem(
public final JSeparator separator_5 = new JSeparator();
public final JMenuItem mntmStartZkmString = new JMenuItem(
"ZKM String Decrypter");
private final JMenuItem mntmNewMenuItem_1 = new JMenuItem(
public final JMenuItem mntmNewMenuItem_1 = new JMenuItem(
"Malicious Code Scanner");
private final JMenuItem mntmNewMenuItem_2 = new JMenuItem(
public final JMenuItem mntmNewMenuItem_2 = new JMenuItem(
"Allatori String Decrypter");
private final JMenuItem mntmShowAllStrings = new JMenuItem(
public final JMenuItem mntmShowAllStrings = new JMenuItem(
"Show All Strings");
private final JMenuItem mntmShowMainMethods = new JMenuItem(
public final JMenuItem mntmShowMainMethods = new JMenuItem(
"Show Main Methods");
private final JMenuItem mntmNewMenuItem_3 = new JMenuItem("Save As Jar..");
private JMenuBar menuBar = new JMenuBar();
private final JMenuItem mntmReplaceStrings = new JMenuItem(
public final JMenuItem mntmNewMenuItem_3 = new JMenuItem("Save As Jar..");
public JMenuBar menuBar = new JMenuBar();
public final JMenuItem mntmReplaceStrings = new JMenuItem(
"Replace Strings");
private final JMenuItem mntmNewMenuItem_4 = new JMenuItem("");
private final JMenu mnNewMenu_3 = new JMenu("CFR");
private final JMenu mnNewMenu_4 = new JMenu("Procyon");
public final JMenuItem mntmNewMenuItem_4 = new JMenuItem("");
public final JMenu mnNewMenu_3 = new JMenu("CFR");
public final JMenu mnNewMenu_4 = new JMenu("Procyon");
public final JCheckBoxMenuItem decodeenumswitch = new JCheckBoxMenuItem(
"Decode Enum Switch");
public final JCheckBoxMenuItem sugarenums = new JCheckBoxMenuItem(
@ -277,27 +293,22 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
"Append Brackets To Labels");
public final JCheckBoxMenuItem chckbxmntmNewCheckItem_12 = new JCheckBoxMenuItem(
"Update Check");
private final JMenu mnNewMenu_5 = new JMenu("Obfuscate");
private final JMenuItem mntmNewMenuItem_6 = new JMenuItem("Rename Fields");
private final JMenuItem mntmNewMenuItem_7 = new JMenuItem("Rename Methods");
private final JMenuItem mntmNewMenuItem_8 = new JMenuItem(
public final JMenu mnNewMenu_5 = new JMenu("Obfuscate");
public final JMenuItem mntmNewMenuItem_6 = new JMenuItem("Rename Fields");
public final JMenuItem mntmNewMenuItem_7 = new JMenuItem("Rename Methods");
public final JMenuItem mntmNewMenuItem_8 = new JMenuItem(
"Move All Classes Into Root Package");
private final JMenuItem mntmNewMenuItem_9 = new JMenuItem("Control Flow");
private final JMenuItem mntmNewMenuItem_10 = new JMenuItem("Junk Code");
public final JMenuItem mntmNewMenuItem_9 = new JMenuItem("Control Flow");
public final JMenuItem mntmNewMenuItem_10 = new JMenuItem("Junk Code");
public final ButtonGroup obfuscatorGroup = new ButtonGroup();
public final JRadioButtonMenuItem strongObf = new JRadioButtonMenuItem(
"Strong Obfuscation");
public final JRadioButtonMenuItem lightObf = new JRadioButtonMenuItem(
"Light Obfuscation");
private final JMenuItem mntmNewMenuItem_11 = new JMenuItem("Rename Classes");
private final JSeparator separator_2 = new JSeparator();
public final ButtonGroup panelGroup1 = new ButtonGroup();
public final ButtonGroup panelGroup2 = new ButtonGroup();
public final ButtonGroup panelGroup3 = new ButtonGroup();
private final JMenu mnNewMenu_6 = new JMenu("View Panes");
private final JMenu mnNewMenu_7 = new JMenu("Pane 1");
private final JMenu mnNewMenu_8 = new JMenu("Pane 2");
private final JMenu mnNewMenu_9 = new JMenu("Pane 3");
public final JMenuItem mntmNewMenuItem_11 = new JMenuItem("Rename Classes");
public final JSeparator separator_2 = new JSeparator();
public final JMenu mnNewMenu_6 = new JMenu("View");
public final JMenu mnNewMenu_7 = new JMenu("Pane 1");
public final JRadioButtonMenuItem panel1None = new JRadioButtonMenuItem(
"None");
public final JRadioButtonMenuItem panel1Hexcode = new JRadioButtonMenuItem(
@ -305,39 +316,15 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
public final JRadioButtonMenuItem panel1Bytecode = new JRadioButtonMenuItem(
"Bytecode");
public final JRadioButtonMenuItem panel1Fern = new JRadioButtonMenuItem(
"FernFlower");
"Java");
public final JRadioButtonMenuItem panel1CFR = new JRadioButtonMenuItem(
"CFR");
"Java");
public final JRadioButtonMenuItem panel1Proc = new JRadioButtonMenuItem(
"Procyon");
public final JRadioButtonMenuItem panel2None = new JRadioButtonMenuItem(
"None");
public final JRadioButtonMenuItem panel2Proc = new JRadioButtonMenuItem(
"Procyon");
public final JRadioButtonMenuItem panel2CFR = new JRadioButtonMenuItem(
"CFR");
public final JRadioButtonMenuItem panel2Bytecode = new JRadioButtonMenuItem(
"Bytecode");
public final JRadioButtonMenuItem panel2Fern = new JRadioButtonMenuItem(
"FernFlower");
public final JRadioButtonMenuItem panel2Hexcode = new JRadioButtonMenuItem(
"Hexcode");
public final JRadioButtonMenuItem panel3None = new JRadioButtonMenuItem(
"None");
public final JRadioButtonMenuItem panel3Proc = new JRadioButtonMenuItem(
"Procyon");
public final JRadioButtonMenuItem panel3CFR = new JRadioButtonMenuItem(
"CFR");
public final JRadioButtonMenuItem panel3Fern = new JRadioButtonMenuItem(
"FernFlower");
public final JRadioButtonMenuItem panel3Bytecode = new JRadioButtonMenuItem(
"Bytecode");
public final JRadioButtonMenuItem panel3Hexcode = new JRadioButtonMenuItem(
"Hexcode");
private final JMenuItem mntmNewMenuItem_12 = new JMenuItem("Save Java File..");
"Java");
public final JMenuItem mntmNewMenuItem_12 = new JMenuItem("Save Java File..");
public WorkPane workPane = new WorkPane(this);
private final JMenu mnSettings = new JMenu("Settings");
private final JSeparator separator_6 = new JSeparator();
public final JMenu mnSettings = new JMenu("Settings");
public final JSeparator separator_6 = new JSeparator();
public final JCheckBoxMenuItem refreshOnChange = new JCheckBoxMenuItem("Refresh On View Change");
public FileNavigationPane cn = new FileNavigationPane(this);
@ -382,7 +369,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
}
}
private class Test implements KeyEventDispatcher {
public class Test implements KeyEventDispatcher {
@Override
public boolean dispatchKeyEvent(KeyEvent e) {
BytecodeViewer.checkHotKey(e);
@ -390,40 +377,95 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
}
}
private final JMenuItem mntmSaveAsApk = new JMenuItem("Save As DEX..");
private final JMenuItem mntmCodeSequenceDiagram = new JMenuItem("Code Sequence Diagram");
private final JSeparator separator_7 = new JSeparator();
private final JSeparator separator_8 = new JSeparator();
private final JSeparator separator_9 = new JSeparator();
private final JSeparator separator_10 = new JSeparator();
private final JSeparator separator_11 = new JSeparator();
private final JSeparator separator_12 = new JSeparator();
public final JMenuItem mntmSaveAsApk = new JMenuItem("Save As DEX..");
public final JMenuItem mntmCodeSequenceDiagram = new JMenuItem("Code Sequence Diagram");
public final JSeparator separator_7 = new JSeparator();
public final JSeparator separator_8 = new JSeparator();
public final JRadioButtonMenuItem panel1Smali = new JRadioButtonMenuItem("Smali/DEX");
public final JRadioButtonMenuItem panel2Smali = new JRadioButtonMenuItem("Smali/DEX");
public final JRadioButtonMenuItem panel3Smali = new JRadioButtonMenuItem("Smali/DEX");
public final JCheckBoxMenuItem autoCompileSmali = new JCheckBoxMenuItem("Compile On Save");
private final JMenuItem mntmNewMenuItem_13 = new JMenuItem("Compile");
public final JMenuItem mntmNewMenuItem_13 = new JMenuItem("Compile");
public final JCheckBoxMenuItem autoCompileOnRefresh = new JCheckBoxMenuItem("Compile On Refresh");
private final JMenuItem mntmSetPythonDirectory = new JMenuItem("Set Python 2.7 Executable");
private final JSeparator separator_13 = new JSeparator();
public final JRadioButtonMenuItem panel1Krakatau = new JRadioButtonMenuItem("Krakatau");
public final JRadioButtonMenuItem panel1KrakatauEditable = new JRadioButtonMenuItem("Krakatau Bytecode");
public final JRadioButtonMenuItem panel2Krakatau = new JRadioButtonMenuItem("Krakatau");
public final JRadioButtonMenuItem panel2KrakatauEditable = new JRadioButtonMenuItem("Krakatau Bytecode");
public final JRadioButtonMenuItem panel3Krakatau = new JRadioButtonMenuItem("Krakatau");
public final JRadioButtonMenuItem panel3KrakatauEditable = new JRadioButtonMenuItem("Krakatau Bytecode");
private final JMenuItem mntmSetJreRt = new JMenuItem("Set JRE RT Library");
private final JSeparator separator_14 = new JSeparator();
public final JCheckBoxMenuItem pane1Editable = new JCheckBoxMenuItem("Pane 1 Editable");
public final JCheckBoxMenuItem pane2Editable = new JCheckBoxMenuItem("Pane 2 Editable");
public final JCheckBoxMenuItem pane3Editable = new JCheckBoxMenuItem("Pane 3 Editable");
private final JMenuItem mntmZstringarrayDecrypter = new JMenuItem("ZStringArray Decrypter");
private final JSeparator separator_15 = new JSeparator();
private final JSeparator separator_16 = new JSeparator();
private final JSeparator separator_17 = new JSeparator();
private final JMenuItem mntmRun = new JMenuItem("Run");
private final JSeparator separator_18 = new JSeparator();
public final JMenuItem mntmSetPythonDirectory = new JMenuItem("Set Python 2.7 Executable");
public final JSeparator separator_13 = new JSeparator();
public final JRadioButtonMenuItem panel1Krakatau = new JRadioButtonMenuItem("Java");
public final JRadioButtonMenuItem panel1KrakatauBytecode = new JRadioButtonMenuItem("Bytecode");
public final JMenuItem mntmSetJreRt = new JMenuItem("Set JRE RT Library");
public final JMenuItem mntmZstringarrayDecrypter = new JMenuItem("ZStringArray Decrypter");
public final JSeparator separator_15 = new JSeparator();
public final JMenuItem mntmRun = new JMenuItem("Run");
public final JSeparator separator_18 = new JSeparator();
public final JCheckBoxMenuItem decodeAPKResources = new JCheckBoxMenuItem("Decode APK Resources");
public final JMenu mnProcyon = new JMenu("Procyon");
public final JCheckBoxMenuItem panel1Proc_E = new JCheckBoxMenuItem("Editable");
public final JSeparator separator_14 = new JSeparator();
public final JMenu mnCfr = new JMenu("CFR");
public final JSeparator separator_19 = new JSeparator();
public final JCheckBoxMenuItem panel1CFR_E = new JCheckBoxMenuItem("Editable");
public final JMenu mnFernflower = new JMenu("FernFlower");
public final JSeparator separator_20 = new JSeparator();
public final JCheckBoxMenuItem panel1Fern_E = new JCheckBoxMenuItem("Editable");
public final JMenu mnKrakatau = new JMenu("Krakatau");
public final JSeparator separator_21 = new JSeparator();
public final JCheckBoxMenuItem panel1Krakatau_E = new JCheckBoxMenuItem("Editable");
public final JMenu mnSmalidex = new JMenu("Smali/DEX");
public final JSeparator separator_22 = new JSeparator();
public final JCheckBoxMenuItem panel1Smali_E = new JCheckBoxMenuItem("Editable");
public final JMenu mnPane = new JMenu("Pane 2");
public final JRadioButtonMenuItem panel2None = new JRadioButtonMenuItem("None");
public final JSeparator separator_9 = new JSeparator();
public final JMenu menu_1 = new JMenu("Procyon");
public final JRadioButtonMenuItem panel2Proc = new JRadioButtonMenuItem("Java");
public final JSeparator separator_10 = new JSeparator();
public final JCheckBoxMenuItem panel2Proc_E = new JCheckBoxMenuItem("Editable");
public final JMenu menu_2 = new JMenu("CFR");
public final JRadioButtonMenuItem panel2CFR = new JRadioButtonMenuItem("Java");
public final JSeparator separator_11 = new JSeparator();
public final JCheckBoxMenuItem panel2CFR_E = new JCheckBoxMenuItem("Editable");
public final JMenu menu_3 = new JMenu("FernFlower");
public final JRadioButtonMenuItem panel2Fern = new JRadioButtonMenuItem("Java");
public final JSeparator separator_12 = new JSeparator();
public final JCheckBoxMenuItem panel2Fern_E = new JCheckBoxMenuItem("Editable");
public final JMenu menu_4 = new JMenu("Krakatau");
public final JRadioButtonMenuItem panel2Krakatau = new JRadioButtonMenuItem("Java");
public final JRadioButtonMenuItem panel2KrakatauBytecode = new JRadioButtonMenuItem("Bytecode");
public final JSeparator separator_16 = new JSeparator();
public final JCheckBoxMenuItem panel2Krakatau_E = new JCheckBoxMenuItem("Editable");
public final JSeparator separator_17 = new JSeparator();
public final JMenu menu_5 = new JMenu("Smali/DEX");
public final JRadioButtonMenuItem panel2Smali = new JRadioButtonMenuItem("Smali/DEX");
public final JSeparator separator_23 = new JSeparator();
public final JCheckBoxMenuItem panel2Smali_E = new JCheckBoxMenuItem("Editable");
public final JSeparator separator_24 = new JSeparator();
public final JRadioButtonMenuItem panel2Bytecode = new JRadioButtonMenuItem("Bytecode");
public final JRadioButtonMenuItem panel2Hexcode = new JRadioButtonMenuItem("Hexcode");
public final JMenu mnPane_1 = new JMenu("Pane 3");
public final JRadioButtonMenuItem panel3None = new JRadioButtonMenuItem("None");
public final JSeparator separator_25 = new JSeparator();
public final JMenu menu_7 = new JMenu("Procyon");
public final JRadioButtonMenuItem panel3Proc = new JRadioButtonMenuItem("Java");
public final JSeparator separator_26 = new JSeparator();
public final JCheckBoxMenuItem panel3Proc_E = new JCheckBoxMenuItem("Editable");
public final JMenu menu_8 = new JMenu("CFR");
public final JRadioButtonMenuItem panel3CFR = new JRadioButtonMenuItem("Java");
public final JSeparator separator_27 = new JSeparator();
public final JCheckBoxMenuItem panel3CFR_E = new JCheckBoxMenuItem("Editable");
public final JMenu menu_9 = new JMenu("FernFlower");
public final JRadioButtonMenuItem panel3Fern = new JRadioButtonMenuItem("Java");
public final JSeparator separator_28 = new JSeparator();
public final JCheckBoxMenuItem panel3Fern_E = new JCheckBoxMenuItem("Editable");
public final JMenu menu_10 = new JMenu("Krakatau");
public final JRadioButtonMenuItem panel3Krakatau = new JRadioButtonMenuItem("Java");
public final JRadioButtonMenuItem panel3KrakatauBytecode = new JRadioButtonMenuItem("Bytecode");
public final JSeparator separator_29 = new JSeparator();
public final JCheckBoxMenuItem panel3Krakatau_E = new JCheckBoxMenuItem("Editable");
public final JSeparator separator_30 = new JSeparator();
public final JMenu menu_11 = new JMenu("Smali/DEX");
public final JRadioButtonMenuItem panel3Smali = new JRadioButtonMenuItem("Smali/DEX");
public final JSeparator separator_31 = new JSeparator();
public final JCheckBoxMenuItem panel3Smali_E = new JCheckBoxMenuItem("Editable");
public final JSeparator separator_32 = new JSeparator();
public final JRadioButtonMenuItem panel3Bytecode = new JRadioButtonMenuItem("Bytecode");
public final JRadioButtonMenuItem panel3Hexcode = new JRadioButtonMenuItem("Hexcode");
public void setIcon(final boolean busy) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
@ -440,6 +482,10 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
});
}
public final ButtonGroup panelGroup1 = new ButtonGroup();
public final ButtonGroup panelGroup2 = new ButtonGroup();
public final ButtonGroup panelGroup3 = new ButtonGroup();
private final JMenuItem mntmSetOpitonalLibrary = new JMenuItem("Set Optionial Library Folder");
public MainViewerGUI() {
mnNewMenu_5.setVisible(false);
KeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(new Test());
@ -462,33 +508,6 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
}
});
this.setIconImages(Resources.iconList);
panelGroup1.add(panel1None);
panelGroup1.add(panel1Fern);
panelGroup1.add(panel1Proc);
panelGroup1.add(panel1CFR);
panelGroup1.add(panel1Smali);
panelGroup1.add(panel1Hexcode);
panelGroup1.add(panel1Krakatau);
panelGroup1.add(panel1KrakatauEditable);
panelGroup1.setSelected(panel1Proc.getModel(), true);//my one true love
panelGroup2.add(panel2None);
panelGroup2.add(panel2Fern);
panelGroup2.add(panel2Proc);
panelGroup2.add(panel2CFR);
panelGroup2.add(panel2Smali);
panelGroup2.add(panel2Hexcode);
panelGroup2.add(panel2Krakatau);
panelGroup2.add(panel2KrakatauEditable);
panelGroup3.add(panel3None);
panelGroup3.add(panel3Fern);
panelGroup3.add(panel3Proc);
panelGroup3.add(panel3CFR);
panelGroup3.add(panel3Smali);
panelGroup3.add(panel3Hexcode);
panelGroup3.add(panel3Krakatau);
panelGroup3.add(panel3KrakatauEditable);
panelGroup3.setSelected(panel3None.getModel(), true);
ActionListener listener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
@ -503,29 +522,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
};
panel1None.addActionListener(listener);
panel1Fern.addActionListener(listener);
panel1Proc.addActionListener(listener);
panel1CFR.addActionListener(listener);
panel1Smali.addActionListener(listener);
panel1Hexcode.addActionListener(listener);
panel1Krakatau.addActionListener(listener);
panel1KrakatauEditable.addActionListener(listener);
panel2None.addActionListener(listener);
panel2Fern.addActionListener(listener);
panel2Proc.addActionListener(listener);
panel2CFR.addActionListener(listener);
panel2Smali.addActionListener(listener);
panel2Hexcode.addActionListener(listener);
panel2Krakatau.addActionListener(listener);
panel2KrakatauEditable.addActionListener(listener);
panel3None.addActionListener(listener);
panel3Fern.addActionListener(listener);
panel3Proc.addActionListener(listener);
panel3CFR.addActionListener(listener);
panel3Smali.addActionListener(listener);
panel3Hexcode.addActionListener(listener);
panel3Krakatau.addActionListener(listener);
panel3KrakatauEditable.addActionListener(listener);
obfuscatorGroup.add(strongObf);
obfuscatorGroup.add(lightObf);
obfuscatorGroup.setSelected(strongObf.getModel(), true);
@ -1055,36 +1052,56 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
mnNewMenu.add(mntmExit);
menuBar.add(mnNewMenu_6);
mnNewMenu_6.add(pane1Editable);
pane2Editable.setVerticalTextPosition(SwingConstants.TOP);
mnNewMenu_6.add(pane2Editable);
mnNewMenu_6.add(pane3Editable);
mnNewMenu_6.add(separator_14);
mnNewMenu_6.add(mnNewMenu_7);
mnNewMenu_7.add(panel1None);
mnNewMenu_7.add(separator_7);
mnNewMenu_7.add(panel1Proc);
mnNewMenu_7.add(panel1CFR);
mnNewMenu_7.add(panel1Fern);
mnNewMenu_7.add(panel1Krakatau);
mnNewMenu_7.add(mnProcyon);
mnProcyon.add(panel1Proc);
mnProcyon.add(separator_14);
mnProcyon.add(panel1Proc_E);
panel1Proc.addActionListener(listener);
mnNewMenu_7.add(mnCfr);
mnCfr.add(panel1CFR);
panel1CFR.addActionListener(listener);
mnCfr.add(separator_19);
mnCfr.add(panel1CFR_E);
mnNewMenu_7.add(mnFernflower);
mnFernflower.add(panel1Fern);
panel1Fern.addActionListener(listener);
mnFernflower.add(separator_20);
mnFernflower.add(panel1Fern_E);
mnNewMenu_7.add(mnKrakatau);
mnKrakatau.add(panel1Krakatau);
panel1Krakatau.addActionListener(listener);
mnKrakatau.add(panel1KrakatauBytecode);
panel1KrakatauBytecode.addActionListener(listener);
mnKrakatau.add(separator_21);
mnKrakatau.add(panel1Krakatau_E);
mnNewMenu_7.add(separator_8);
mnNewMenu_7.add(panel1KrakatauEditable);
mnNewMenu_7.add(mnSmalidex);
mnSmalidex.add(panel1Smali);
panel1Smali.addActionListener(listener);
mnNewMenu_7.add(panel1Smali);
panelGroup1.add(panel1Bytecode);
mnSmalidex.add(separator_22);
mnSmalidex.add(panel1Smali_E);
panel1Bytecode.addActionListener(listener);
mnNewMenu_7.add(separator_15);
@ -1092,63 +1109,118 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
mnNewMenu_7.add(panel1Bytecode);
mnNewMenu_7.add(panel1Hexcode);
mnNewMenu_6.add(mnNewMenu_8);
mnNewMenu_8.add(panel2None);
mnNewMenu_8.add(separator_9);
mnNewMenu_8.add(panel2Proc);
mnNewMenu_8.add(panel2CFR);
mnNewMenu_8.add(panel2Fern);
mnNewMenu_6.add(mnPane);
mnNewMenu_8.add(panel2Krakatau);
mnPane.add(panel2None);
mnNewMenu_8.add(separator_10);
mnPane.add(separator_9);
mnNewMenu_8.add(panel2KrakatauEditable);
mnPane.add(menu_1);
mnNewMenu_8.add(panel2Smali);
panelGroup2.add(panel2Bytecode);
panelGroup2.setSelected(panel2Bytecode.getModel(), true);
panel2Bytecode.addActionListener(listener);
mnNewMenu_8.add(separator_16);
menu_1.add(panel2Proc);
mnNewMenu_8.add(panel2Bytecode);
mnNewMenu_8.add(panel2Hexcode);
mnNewMenu_6.add(mnNewMenu_9);
mnNewMenu_9.add(panel3None);
menu_1.add(separator_10);
mnNewMenu_9.add(separator_11);
mnNewMenu_9.add(panel3Proc);
mnNewMenu_9.add(panel3CFR);
mnNewMenu_9.add(panel3Fern);
menu_1.add(panel2Proc_E);
mnNewMenu_9.add(panel3Krakatau);
mnPane.add(menu_2);
mnNewMenu_9.add(separator_12);
menu_2.add(panel2CFR);
mnNewMenu_9.add(panel3KrakatauEditable);
menu_2.add(separator_11);
mnNewMenu_9.add(panel3Smali);
panelGroup3.add(panel3Bytecode);
panel3Bytecode.addActionListener(listener);
mnNewMenu_9.add(separator_17);
menu_2.add(panel2CFR_E);
mnNewMenu_9.add(panel3Bytecode);
mnNewMenu_9.add(panel3Hexcode);
mnPane.add(menu_3);
menu_3.add(panel2Fern);
menu_3.add(separator_12);
menu_3.add(panel2Fern_E);
mnPane.add(menu_4);
menu_4.add(panel2Krakatau);
menu_4.add(panel2KrakatauBytecode);
menu_4.add(separator_16);
menu_4.add(panel2Krakatau_E);
mnPane.add(separator_17);
mnPane.add(menu_5);
menu_5.add(panel2Smali);
menu_5.add(separator_23);
menu_5.add(panel2Smali_E);
mnPane.add(separator_24);
mnPane.add(panel2Bytecode);
mnPane.add(panel2Hexcode);
mnNewMenu_6.add(mnPane_1);
mnPane_1.add(panel3None);
mnPane_1.add(separator_25);
mnPane_1.add(menu_7);
menu_7.add(panel3Proc);
menu_7.add(separator_26);
menu_7.add(panel3Proc_E);
mnPane_1.add(menu_8);
menu_8.add(panel3CFR);
menu_8.add(separator_27);
menu_8.add(panel3CFR_E);
mnPane_1.add(menu_9);
menu_9.add(panel3Fern);
menu_9.add(separator_28);
menu_9.add(panel3Fern_E);
mnPane_1.add(menu_10);
menu_10.add(panel3Krakatau);
menu_10.add(panel3KrakatauBytecode);
menu_10.add(separator_29);
menu_10.add(panel3Krakatau_E);
mnPane_1.add(separator_30);
mnPane_1.add(menu_11);
menu_11.add(panel3Smali);
menu_11.add(separator_31);
menu_11.add(panel3Smali_E);
mnPane_1.add(separator_32);
mnPane_1.add(panel3Bytecode);
mnPane_1.add(panel3Hexcode);
menuBar.add(mnSettings);
@ -1177,6 +1249,13 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
});
mnSettings.add(mntmSetJreRt);
mntmSetOpitonalLibrary.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
library();
}
});
mnSettings.add(mntmSetOpitonalLibrary);
mnSettings.add(separator_6);
mnSettings.add(mnNewMenu_4);
@ -1565,6 +1644,45 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
rfComps.add(s);
rfComps.add(workPane);
panelGroup1.add(panel1None);
panelGroup1.add(panel1Proc);
panelGroup1.add(panel1CFR);
panelGroup1.add(panel1Fern);
panelGroup1.add(panel1Krakatau);
panelGroup1.add(panel1KrakatauBytecode);
panelGroup1.add(panel1Smali);
panelGroup1.add(panel1Bytecode);
panelGroup1.add(panel1Hexcode);
panelGroup2.add(panel2None);
panelGroup2.add(panel2Proc);
panelGroup2.add(panel2CFR);
panelGroup2.add(panel2Fern);
panelGroup2.add(panel2Krakatau);
panelGroup2.add(panel2KrakatauBytecode);
panelGroup2.add(panel2Smali);
panelGroup2.add(panel2Bytecode);
panelGroup2.add(panel2Hexcode);
panelGroup3.add(panel3None);
panelGroup3.add(panel3Proc);
panelGroup3.add(panel3CFR);
panelGroup3.add(panel3Fern);
panelGroup3.add(panel3Krakatau);
panelGroup3.add(panel3KrakatauBytecode);
panelGroup3.add(panel3Smali);
panelGroup3.add(panel3Bytecode);
panelGroup3.add(panel3Hexcode);
panelGroup1.setSelected(panel1Proc.getModel(), true);//my one true love
panelGroup2.setSelected(panel2Bytecode.getModel(), true);
panelGroup3.setSelected(panel3None.getModel(), true);
this.setLocationRelativeTo(null);
}
@ -1865,7 +1983,7 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
@Override
public String getDescription() {
return "Python 2.7 Executable";
return "Python (Or PyPy for speed) 2.7 Executable";
}
}
@ -1880,4 +1998,16 @@ public class MainViewerGUI extends JFrame implements FileChangeNotifier {
return "JRE RT Library";
}
}
public class LibraryFileFilter extends FileFilter {
@Override
public boolean accept(File f) {
return f.isDirectory();
}
@Override
public String getDescription() {
return "Optional Library Folder";
}
}
}