2.9.7 preview

This commit is contained in:
Konloch 2015-07-06 09:26:53 -06:00
parent 5f99089d14
commit ca1cad8c6f
4 changed files with 99 additions and 21 deletions

Binary file not shown.

67
src/resources/intro.html Normal file
View File

@ -0,0 +1,67 @@
<html>Bytecode Viewer (BCV) was designed to be extremely user and beginner friendly, because of this almost everything is accessible through an interface, settings, tools, etc. This means if you give BCV a try you should get the gist of it can do, however for those who don't want to run BCV until they're convinced they should use it, below is a complete list of features BCV has, and what they do.
<h2>File:</h2>
<ul>
<li>Add (Ctrl + O) - If you add a jar/zip BCV will unzip it, if you add an APK or DEX file, BCV will run dex2jar then run the jar input process.</li>
<li>New Workspace (Ctrl + N) - It clears the opened jars/resources.</li>
<li>Run (Ctrl + R) - Runs the classfiles you've loaded into BCV in a secure sandboxed JVM instance that you can fully debug.</li>
<li>Compile (Ctrl + T) - Tries to compile all of the editable panes you've selected, if it's Java it'll compile with Ranino. Krakatau and *Smali use their own assemblers.</li>
<li>Save As Jar - Export the class files and loaded resources as a runnable Jar file.</li>
<li>Save As DEX - Run jar2dex and export the Classfiles as DEX.</li>
<li>Save Files As - Save all the Classfiles and resources as a zip.</li>
<li>Save Java File As - Save the currently opened decompiled Classfile.</li>
<li>Save Java Files As - Save all of the decompiled Classfiles as a zip.</li>
<li>Recent Files - Last 25 files/directories you've opened with BCV.</li>
<li>About - A small information window about BCV.</li>
<li>Exit - Closes BCV.</li>
</ul>
<h2>View Panes:</h2>
<ul>
<li>Editable - Defines if that viewing pane will be editable.</li>
<li>None - Nothing will be displayed.</li>
<li>Procyon - Decompiles with Procyon decompiler.</li>
<li>CFR - Decompilers with CFR decompiler.</li>
<li>FernFlower - Decompiles with FernFlower decompiler.</li>
<li>JD-GUI - Decompiles with JD-GUI decompiler.</li>
<li>Krakatau Java - Decompiles with Krakatau decompiler.</li>
<li>Krakatau Bytecode - Disassembles with Krakatau disassembler.</li>
<li>Smali - Disassembles with Smali.</li>
<li>Bytecode - Decompiles the Bytecode via CFIDE. Not Editable.</li>
<li>Hexcode - Shows the classfile in a hex viewer. Not Editable.</li>
</ul>
<h2>Settings:</h2>
<ul>
<li>Compile On Save - If selected whenever you do one of the File>Save * functions it will try to compile before it saves.</li>
<li>Compile On Refresh - If selected whenever you press refresh it compile before it reloads the resource/class.</li>
<li>Update Check - If selected it queries https://github.com/Konloch/bytecode-viewer to ensure you've got the latest version.</li>
<li>Refresh On View Change - If selected whenever you change an option in the View Panes it will refresh the currently opened resources/class.</li>
<li>Decode APK Resources - If selected whenever you add an APK, it will first run APKTool.jar to decode the resources.</li>
<li>Set Python 2.7 Executable - Set the Python 2.7 executable if you want Krakatau decompiler/disassembler/assembler to work.</li>
<li>Set JRE RT Library - Set the JRE RT library for Krakatau decompiler.</li>
</ul>
<h2>Plugins:</h2>
<ul>
<li>Open Plugin - Open a .java plugin created for BCV.</li>
<li>Recent Plugins - Last 25 plugins you've opened with BCV.</li>
<li>Code Sequence Diagram - Builds a crude code sequence diagram for the classfile that's currently opened.</li>
<li>Malicious Code Scanner - Allows you to define what to search for, and outputs what it found.</li>
<li>Show Main Methods - Detects and outputs all of the public static void main(String[]) functions.</li>
<li>Show All Strings - Grabs then outputs all of the strings in every classfile.</li>
<li>Replace Strings - Allows you to do a simple permanent .replace on the classfile strings, very useful for URL swapping.</li>
<li>Allatori String Decrypter - Decrypts the Allatori obfuscated/encrypted strings.</li>
<li>ZKM String Decrypter - Decrypts the ZKM obfuscated/encrypted strings.</li>
<li>ZStringArray String Decrypter - Decrypts the ZStringArray obfuscated/encrypted strings.</li>
</ul>
<h2>Notes:</h2>
<ul>
<li>If BCV fails to boot simply append -clean as an argument to clean the lib directory.</li>
<li>Relax and take notes, while I take tokes of the marijuana smoke.</li>
<li>BCV was created out of love for Java Reverse engineering.</li>
<li>Bytecode Viewer's Homepage is http://bytecodeviewer.com</li>
</ul>
</html>

View File

@ -356,10 +356,10 @@ public class BytecodeViewer {
System.setSecurityManager(sm);
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
new BootScreen().DO_FIRST_BOOT(args);
} catch (Exception e) {
new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
}
new BootScreen().DO_FIRST_BOOT(args);
}
public static void BOOT(String[] args) {

View File

@ -55,7 +55,7 @@ public class BootScreen extends JFrame {
private JProgressBar progressBar = new JProgressBar();
public BootScreen() {
public BootScreen() throws IOException {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setIconImages(Resources.iconList);
setSize(new Dimension(600, 800));
@ -79,7 +79,7 @@ public class BootScreen extends JFrame {
JEditorPane editorPane = new JEditorPane();
editorPane.setEditorKit(new HTMLEditorKit());
editorPane.setText("http://www.icesoft.org/java/home.jsf");
editorPane.setText(convertStreamToString(BytecodeViewer.class.getClassLoader().getResourceAsStream("resources/intro.html")));
scrollPane.setViewportView(editorPane);
@ -91,6 +91,15 @@ public class BootScreen extends JFrame {
this.setLocationRelativeTo(null);
}
static String convertStreamToString(java.io.InputStream is) throws IOException {
@SuppressWarnings("resource")
java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
String string = s.hasNext() ? s.next() : "";
is.close();
s.close();
return string;
}
public void DO_FIRST_BOOT(String args[]) {
this.setVisible(true);
if(FIRST_BOOT)
@ -208,26 +217,28 @@ public class BootScreen extends JFrame {
for(String s : libsFileList ) {
if(s.endsWith(".jar")) {
File f = new File(s);
setTitle("Bytecode Viewer Boot Screen - Loading Library " + f.getName());
System.out.println(f.getName());
JarFile jarFile = new JarFile(s);
Enumeration<JarEntry> e = jarFile.entries();
ClassPathHack.addFile(f);
while (e.hasMoreElements()) {
JarEntry je = (JarEntry) e.nextElement();
if(je.isDirectory() || !je.getName().endsWith(".class")){
continue;
}
try {
String className = je.getName().substring(0,je.getName().length()-6);
className = className.replace('/', '.');
ClassLoader.getSystemClassLoader().loadClass(className);
} catch(java.lang.VerifyError | java.lang.ExceptionInInitializerError | java.lang.IncompatibleClassChangeError | java.lang.NoClassDefFoundError | Exception e2) {
//ignore
if(f.exists()) {
setTitle("Bytecode Viewer Boot Screen - Loading Library " + f.getName());
System.out.println(f.getName());
JarFile jarFile = new JarFile(s);
Enumeration<JarEntry> e = jarFile.entries();
ClassPathHack.addFile(f);
while (e.hasMoreElements()) {
JarEntry je = (JarEntry) e.nextElement();
if(je.isDirectory() || !je.getName().endsWith(".class")){
continue;
}
try {
String className = je.getName().substring(0,je.getName().length()-6);
className = className.replace('/', '.');
ClassLoader.getSystemClassLoader().loadClass(className);
} catch(java.lang.VerifyError | java.lang.ExceptionInInitializerError | java.lang.IncompatibleClassChangeError | java.lang.NoClassDefFoundError | Exception e2) {
//ignore
}
}
jarFile.close();
}
jarFile.close();
}
}
setTitle("Bytecode Viewer Boot Screen - Booting!");