2.9.1
02/24/2015 - Fixed the third pane window not showing the search buttons. 02/24/2015 - Fixed some issues with the compiler functionality.
This commit is contained in:
parent
fd9f07817d
commit
3df513f0cd
6 changed files with 78 additions and 73 deletions
Binary file not shown.
Binary file not shown.
|
@ -318,4 +318,7 @@ Changelog:
|
||||||
02/23/2015 - Not really code related, but added _install.bat and _uninstall.bat for the exe version of BCV.
|
02/23/2015 - Not really code related, but added _install.bat and _uninstall.bat for the exe version of BCV.
|
||||||
02/23/2015 - Back to ASM5, packed dex2jar in its own obfuscated jar.
|
02/23/2015 - Back to ASM5, packed dex2jar in its own obfuscated jar.
|
||||||
02/23/2015 - Added the annotations back to the Bytecode Decompiler. (Once again, thanks Bibl)
|
02/23/2015 - Added the annotations back to the Bytecode Decompiler. (Once again, thanks Bibl)
|
||||||
02/23/2015 - It once again works with Java 8 Jars.
|
02/23/2015 - It once again works with Java 8 Jars.
|
||||||
|
--- 2.9.1 ---:
|
||||||
|
02/24/2015 - Fixed the third pane window not showing the search buttons.
|
||||||
|
02/24/2015 - Fixed some issues with the compiler functionality.
|
|
@ -81,32 +81,9 @@ import the.bytecode.club.bytecodeviewer.gui.WorkPane;
|
||||||
* fix the randomly sometimes fucked up names on file navigation bug
|
* fix the randomly sometimes fucked up names on file navigation bug
|
||||||
* make zipfile not include the decode shit
|
* make zipfile not include the decode shit
|
||||||
*
|
*
|
||||||
* -----2.9.0-----:
|
* -----2.9.1-----:
|
||||||
* 02/11/2015 - Added ZStringArray String Decrypter. (Thanks Righteous)
|
* 02/24/2015 - Fixed the third pane window not showing the search buttons.
|
||||||
* 02/20/2015 - Moved the decompilers/disassemblers around.
|
* 02/24/2015 - Fixed some issues with the compiler functionality.
|
||||||
* 02/20/2015 - Fixed a resource leak with Krakatau Decompiler/Disassembler/Assembler.
|
|
||||||
* 02/21/2015 - Fixed regex searching if your regex search contained a syntax error.
|
|
||||||
* 02/21/2015 - Added the compiler/decompiler instances to the BytecodeViewer API class.
|
|
||||||
* 02/21/2015 - Sped up the decompilers, each view pane runs its own decompiler thread.
|
|
||||||
* 02/21/2015 - Added Janino compiler, you can now compile the decompiled source code inside of BCV.
|
|
||||||
* 02/21/2015 - Added the editable option for almost all of the decompilers/disassemblers.
|
|
||||||
* 02/21/2015 - Cached the next/previous icons and added a resources class for all resources.
|
|
||||||
* 01/21/2015 - Renamed EZ-Injection as File-Run, however kept the plugin named EZ-Injection.
|
|
||||||
* 02/21/2015 - Dropped Groovy support, added .Java plugin compilation instead (now only 10mb).
|
|
||||||
* 02/21/2015 - Added support for reading resources, including displaying images, detecting pure ascii files and more.
|
|
||||||
* 02/21/2015 - Fixed an issue with loading an already selected node in the file navigation pane.
|
|
||||||
* 02/22/2015 - Added an error console to the Java compiler
|
|
||||||
* 02/22/2015 - Ensured the spawned Python/Krakatau processes are killed when closing BCV.
|
|
||||||
* 02/22/2015 - Made it more beginner friendly.
|
|
||||||
* 02/22/2015 - Fixed? The file navigation search.
|
|
||||||
* 02/22/2015 - Added a shit ton more comments to non-api related classes.
|
|
||||||
* 02/23/2015 - Added APK resources.
|
|
||||||
* 02/23/2015 - MORE ANDROID LOVE! Added APKTool.jar's decode. (Takes a while so it's a setting, also pumped the jar back to 16MB :()
|
|
||||||
* 02/23/2015 - Added close all but this tab menu.
|
|
||||||
* 02/23/2015 - Not really code related, but added _install.bat and _uninstall.bat for the exe version of BCV.
|
|
||||||
* 02/23/2015 - Back to ASM5, packed dex2jar in its own obfuscated jar.
|
|
||||||
* 02/23/2015 - Added the annotations back to the Bytecode Decompiler. (Once again, thanks Bibl)
|
|
||||||
* 02/23/2015 - It once again works with Java 8 Jars.
|
|
||||||
*
|
*
|
||||||
* @author Konloch
|
* @author Konloch
|
||||||
*
|
*
|
||||||
|
@ -115,7 +92,7 @@ import the.bytecode.club.bytecodeviewer.gui.WorkPane;
|
||||||
public class BytecodeViewer {
|
public class BytecodeViewer {
|
||||||
|
|
||||||
/*per version*/
|
/*per version*/
|
||||||
public static String version = "2.9.0";
|
public static String version = "2.9.1";
|
||||||
public static String krakatauVersion = "2";
|
public static String krakatauVersion = "2";
|
||||||
/*the rest*/
|
/*the rest*/
|
||||||
public static MainViewerGUI viewer = null;
|
public static MainViewerGUI viewer = null;
|
||||||
|
@ -431,63 +408,80 @@ public class BytecodeViewer {
|
||||||
if(getLoadedClasses().isEmpty())
|
if(getLoadedClasses().isEmpty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
boolean actuallyTried = false;
|
||||||
|
|
||||||
for(java.awt.Component c : BytecodeViewer.viewer.workPane.getLoadedViewers()) {
|
for(java.awt.Component c : BytecodeViewer.viewer.workPane.getLoadedViewers()) {
|
||||||
if(c instanceof ClassViewer) {
|
if(c instanceof ClassViewer) {
|
||||||
ClassViewer cv = (ClassViewer) c;
|
ClassViewer cv = (ClassViewer) c;
|
||||||
Object smali[] = cv.getSmali();
|
if((cv.smali1 != null && cv.smali2 != null && cv.smali3 != null) &&
|
||||||
if(smali != null) {
|
(cv.smali1.isEditable() || cv.smali2.isEditable() || cv.smali3.isEditable())) {
|
||||||
ClassNode origNode = (ClassNode) smali[0];
|
actuallyTried = true;
|
||||||
String smaliText = (String) smali[1];
|
Object smali[] = cv.getSmali();
|
||||||
byte[] smaliCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.smali.compile(smaliText, origNode.name);
|
if(smali != null) {
|
||||||
if(smaliCompiled != null) {
|
ClassNode origNode = (ClassNode) smali[0];
|
||||||
ClassNode newNode = JarUtils.getNode(smaliCompiled);
|
String smaliText = (String) smali[1];
|
||||||
BytecodeViewer.updateNode(origNode, newNode);
|
byte[] smaliCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.smali.compile(smaliText, origNode.name);
|
||||||
} else {
|
if(smaliCompiled != null) {
|
||||||
BytecodeViewer.showMessage("There has been an error with assembling your Smali code, please check this. Class: " + origNode.name);
|
ClassNode newNode = JarUtils.getNode(smaliCompiled);
|
||||||
return false;
|
BytecodeViewer.updateNode(origNode, newNode);
|
||||||
|
} else {
|
||||||
|
BytecodeViewer.showMessage("There has been an error with assembling your Smali code, please check this. Class: " + origNode.name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Object krakatau[] = cv.getKrakatau();
|
if((cv.krakatau1 != null && cv.krakatau2 != null && cv.krakatau3 != null) &&
|
||||||
if(krakatau != null) {
|
(cv.krakatau1.isEditable() || cv.krakatau2.isEditable() || cv.krakatau3.isEditable())) {
|
||||||
ClassNode origNode = (ClassNode) krakatau[0];
|
actuallyTried = true;
|
||||||
String krakatauText = (String) krakatau[1];
|
Object krakatau[] = cv.getKrakatau();
|
||||||
byte[] krakatauCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.krakatau.compile(krakatauText, origNode.name);
|
if(krakatau != null) {
|
||||||
if(krakatauCompiled != null) {
|
ClassNode origNode = (ClassNode) krakatau[0];
|
||||||
ClassNode newNode = JarUtils.getNode(krakatauCompiled);
|
String krakatauText = (String) krakatau[1];
|
||||||
BytecodeViewer.updateNode(origNode, newNode);
|
byte[] krakatauCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.krakatau.compile(krakatauText, origNode.name);
|
||||||
} else {
|
if(krakatauCompiled != null) {
|
||||||
BytecodeViewer.showMessage("There has been an error with assembling your Krakatau Bytecode, please check this. Class: " + origNode.name);
|
ClassNode newNode = JarUtils.getNode(krakatauCompiled);
|
||||||
return false;
|
BytecodeViewer.updateNode(origNode, newNode);
|
||||||
|
} else {
|
||||||
|
BytecodeViewer.showMessage("There has been an error with assembling your Krakatau Bytecode, please check this. Class: " + origNode.name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Object java[] = cv.getJava();
|
if((cv.java1 != null && cv.java2 != null && cv.java3 != null) &&
|
||||||
if(java != null) {
|
(cv.java1.isEditable() || cv.java2.isEditable() || cv.java3.isEditable())) {
|
||||||
ClassNode origNode = (ClassNode) java[0];
|
actuallyTried = true;
|
||||||
String javaText = (String) java[1];
|
Object java[] = cv.getJava();
|
||||||
|
if(java != null) {
|
||||||
SystemErrConsole errConsole = new SystemErrConsole("Java Compile Issues");
|
ClassNode origNode = (ClassNode) java[0];
|
||||||
errConsole.setText("Error compiling class: " + origNode.name + nl + "Keep in mind most decompilers cannot produce compilable classes"+nl+nl);
|
String javaText = (String) java[1];
|
||||||
|
|
||||||
byte[] javaCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.java.compile(javaText, origNode.name);
|
SystemErrConsole errConsole = new SystemErrConsole("Java Compile Issues");
|
||||||
if(javaCompiled != null) {
|
errConsole.setText("Error compiling class: " + origNode.name + nl + "Keep in mind most decompilers cannot produce compilable classes"+nl+nl);
|
||||||
ClassNode newNode = JarUtils.getNode(javaCompiled);
|
|
||||||
BytecodeViewer.updateNode(origNode, newNode);
|
byte[] javaCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.java.compile(javaText, origNode.name);
|
||||||
errConsole.finished();
|
if(javaCompiled != null) {
|
||||||
} else {
|
ClassNode newNode = JarUtils.getNode(javaCompiled);
|
||||||
errConsole.pretty();
|
BytecodeViewer.updateNode(origNode, newNode);
|
||||||
errConsole.setVisible(true);
|
errConsole.finished();
|
||||||
errConsole.finished();
|
} else {
|
||||||
return false;
|
errConsole.pretty();
|
||||||
|
errConsole.setVisible(true);
|
||||||
|
errConsole.finished();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(message)
|
if(message)
|
||||||
BytecodeViewer.showMessage("Compiled Successfully.");
|
if(actuallyTried)
|
||||||
|
BytecodeViewer.showMessage("Compiled Successfully.");
|
||||||
|
else
|
||||||
|
BytecodeViewer.showMessage("You have no editable panes opened, make one editable and try again.");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,8 +43,16 @@ public class CFRDecompiler extends Decompiler {
|
||||||
@Override
|
@Override
|
||||||
public String decompileClassNode(ClassNode cn) {
|
public String decompileClassNode(ClassNode cn) {
|
||||||
final ClassWriter cw = new ClassWriter(0);
|
final ClassWriter cw = new ClassWriter(0);
|
||||||
cn.accept(cw);
|
try {
|
||||||
|
cn.accept(cw);
|
||||||
|
} catch(Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
try {
|
||||||
|
Thread.sleep(200);
|
||||||
|
cn.accept(cw);
|
||||||
|
} catch (InterruptedException e1) { }
|
||||||
|
}
|
||||||
|
|
||||||
String fileStart = BytecodeViewer.tempDirectory + BytecodeViewer.fs;
|
String fileStart = BytecodeViewer.tempDirectory + BytecodeViewer.fs;
|
||||||
|
|
||||||
final File tempClass = new File(MiscUtils.getUniqueName(fileStart, ".class") + ".class");
|
final File tempClass = new File(MiscUtils.getUniqueName(fileStart, ".class") + ".class");
|
||||||
|
|
|
@ -359,8 +359,8 @@ public class ClassViewer extends JPanel {
|
||||||
JPanel buttonPane3 = new JPanel(new BorderLayout());
|
JPanel buttonPane3 = new JPanel(new BorderLayout());
|
||||||
buttonPane3.add(searchNext3, BorderLayout.WEST);
|
buttonPane3.add(searchNext3, BorderLayout.WEST);
|
||||||
buttonPane3.add(searchPrev3, BorderLayout.EAST);
|
buttonPane3.add(searchPrev3, BorderLayout.EAST);
|
||||||
searchNext2.setIcon(Resources.nextIcon);
|
searchNext3.setIcon(Resources.nextIcon);
|
||||||
searchPrev2.setIcon(Resources.prevIcon);
|
searchPrev3.setIcon(Resources.prevIcon);
|
||||||
panel3Search.add(buttonPane3, BorderLayout.WEST);
|
panel3Search.add(buttonPane3, BorderLayout.WEST);
|
||||||
panel3Search.add(field3, BorderLayout.CENTER);
|
panel3Search.add(field3, BorderLayout.CENTER);
|
||||||
panel3Search.add(check3, BorderLayout.EAST);
|
panel3Search.add(check3, BorderLayout.EAST);
|
||||||
|
|
Loading…
Reference in a new issue