v2.9.19 changes
This commit is contained in:
parent
7f227ca7e7
commit
9f3302f7a9
7 changed files with 53 additions and 22 deletions
11
.gitignore
vendored
11
.gitignore
vendored
|
@ -1,7 +1,8 @@
|
||||||
/bin/
|
.bin/
|
||||||
|
.idea/
|
||||||
|
.out/
|
||||||
|
.gradle/
|
||||||
.classpath
|
.classpath
|
||||||
.project
|
.project
|
||||||
*.iml
|
.DS_Store
|
||||||
.idea/
|
*.iml
|
||||||
out/
|
|
||||||
.DS_Store
|
|
|
@ -6,13 +6,15 @@
|
||||||
* ASM by OW2
|
* ASM by OW2
|
||||||
* FernFlower by Stiver
|
* FernFlower by Stiver
|
||||||
* Procyon by Mstrobel
|
* Procyon by Mstrobel
|
||||||
|
* Luyten by DeathMarine
|
||||||
* CFR by Lee Benfield
|
* CFR by Lee Benfield
|
||||||
* CFIDE by Bibl
|
* CFIDE by Bibl
|
||||||
* Smali by JesusFreke
|
* Smali by JesusFreke
|
||||||
* Dex2Jar by pxb1988
|
* Dex2Jar by pxb1988 & Lanchon
|
||||||
* Krakatau by Storyyeller
|
* Krakatau by Storyyeller
|
||||||
* JD GUI/JD Core by The Java-Decompiler Team
|
* JD GUI/JD Core by The Java-Decompiler Team
|
||||||
* Enjarify by Storyyeller
|
* Enjarify by Storyyeller
|
||||||
|
* JADX by Skylot
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
* Konloch
|
* Konloch
|
||||||
|
|
|
@ -3,12 +3,14 @@
|
||||||
Bytecode Viewer - a lightweight user friendly Java Bytecode Viewer.
|
Bytecode Viewer - a lightweight user friendly Java Bytecode Viewer.
|
||||||
|
|
||||||
#### New Features
|
#### New Features
|
||||||
|
* WAR & JSP Loading
|
||||||
|
* JADX-Core Decompiler
|
||||||
* Fixed APK & dex loading
|
* Fixed APK & dex loading
|
||||||
* Fixed Java 10+ classfiles
|
* Fixed Java 10+ classfiles
|
||||||
* Better visual feedback due to the new busy icon system
|
* Better visual feedback due to the new busy icon system
|
||||||
* Synchronized viewing pane option & quick method selection
|
* Synchronized viewing pane option & quick method selection
|
||||||
|
* Updated most libraries to their 2019 version
|
||||||
* Tons of bug fixes and general improvements
|
* Tons of bug fixes and general improvements
|
||||||
* Updated most libraries to their 2019 versions (still a WIP)
|
|
||||||
|
|
||||||
|
|
||||||
#### Links
|
#### Links
|
||||||
|
|
|
@ -320,15 +320,18 @@ public class Boot {
|
||||||
|
|
||||||
public static void dropKrakatau()
|
public static void dropKrakatau()
|
||||||
{
|
{
|
||||||
|
File temp = new File(BytecodeViewer.getBCVDirectory() + BytecodeViewer.fs + "krakatau_" + BytecodeViewer.krakatauVersion + ".zip");
|
||||||
File krakatauDirectory = new File(BytecodeViewer.krakatauWorkingDirectory);
|
File krakatauDirectory = new File(BytecodeViewer.krakatauWorkingDirectory);
|
||||||
BytecodeViewer.krakatauWorkingDirectory = BytecodeViewer.krakatauWorkingDirectory + BytecodeViewer.fs + "Krakatau-master";
|
BytecodeViewer.krakatauWorkingDirectory = BytecodeViewer.krakatauWorkingDirectory + BytecodeViewer.fs + "Krakatau-master";
|
||||||
if (!krakatauDirectory.exists())
|
if (!krakatauDirectory.exists() || temp.exists())
|
||||||
{
|
{
|
||||||
|
if(temp.exists())
|
||||||
|
temp.delete();
|
||||||
|
|
||||||
setState("Bytecode Viewer Boot Screen - Extracting Krakatau");
|
setState("Bytecode Viewer Boot Screen - Extracting Krakatau");
|
||||||
System.out.println("Extracting Krakatau");
|
System.out.println("Extracting Krakatau");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File temp = new File(BytecodeViewer.getBCVDirectory() + BytecodeViewer.fs + "krakatau_" + BytecodeViewer.krakatauVersion + ".zip");
|
|
||||||
|
|
||||||
while (temp.exists())
|
while (temp.exists())
|
||||||
temp.delete();
|
temp.delete();
|
||||||
|
@ -358,15 +361,17 @@ public class Boot {
|
||||||
|
|
||||||
public static void dropEnjarify()
|
public static void dropEnjarify()
|
||||||
{
|
{
|
||||||
|
File temp = new File(BytecodeViewer.getBCVDirectory() + BytecodeViewer.fs + "enjarify" + BytecodeViewer.enjarifyVersion + ".zip");
|
||||||
File enjarifyDirectory = new File(BytecodeViewer.enjarifyWorkingDirectory);
|
File enjarifyDirectory = new File(BytecodeViewer.enjarifyWorkingDirectory);
|
||||||
BytecodeViewer.enjarifyWorkingDirectory = BytecodeViewer.enjarifyWorkingDirectory + BytecodeViewer.fs + "enjarify-master";
|
BytecodeViewer.enjarifyWorkingDirectory = BytecodeViewer.enjarifyWorkingDirectory + BytecodeViewer.fs + "enjarify-master";
|
||||||
if (!enjarifyDirectory.exists())
|
if (!enjarifyDirectory.exists() || temp.exists())
|
||||||
{
|
{
|
||||||
|
if(temp.exists())
|
||||||
|
temp.delete();
|
||||||
setState("Bytecode Viewer Boot Screen - Extracting Enjarify");
|
setState("Bytecode Viewer Boot Screen - Extracting Enjarify");
|
||||||
System.out.println("Extracting Enjarify");
|
System.out.println("Extracting Enjarify");
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File temp = new File(BytecodeViewer.getBCVDirectory() + BytecodeViewer.fs + "enjarify" + BytecodeViewer.enjarifyVersion + ".zip");
|
|
||||||
|
|
||||||
while (temp.exists())
|
while (temp.exists())
|
||||||
temp.delete();
|
temp.delete();
|
||||||
|
|
|
@ -97,7 +97,6 @@ import the.bytecode.club.bytecodeviewer.util.*;
|
||||||
* http://the.bytecode.club
|
* http://the.bytecode.club
|
||||||
*
|
*
|
||||||
* TODO:
|
* TODO:
|
||||||
* Update fernflower for it's 2019 version
|
|
||||||
* Finish dragging code
|
* Finish dragging code
|
||||||
* Finish right-click tab menu detection
|
* Finish right-click tab menu detection
|
||||||
* make it use that global last used inside of export as jar
|
* make it use that global last used inside of export as jar
|
||||||
|
@ -119,7 +118,7 @@ import the.bytecode.club.bytecodeviewer.util.*;
|
||||||
public class BytecodeViewer
|
public class BytecodeViewer
|
||||||
{
|
{
|
||||||
/*per version*/
|
/*per version*/
|
||||||
public static final String VERSION = "2.9.18";
|
public static final String VERSION = "2.9.19";
|
||||||
public static String krakatauVersion = "12";
|
public static String krakatauVersion = "12";
|
||||||
public static String enjarifyVersion = "4";
|
public static String enjarifyVersion = "4";
|
||||||
public static final boolean BLOCK_TAB_MENU = true;
|
public static final boolean BLOCK_TAB_MENU = true;
|
||||||
|
@ -746,8 +745,15 @@ public class BytecodeViewer
|
||||||
String smaliText = (String) smali[1];
|
String smaliText = (String) smali[1];
|
||||||
byte[] smaliCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.smali.compile(smaliText, origNode.name);
|
byte[] smaliCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.smali.compile(smaliText, origNode.name);
|
||||||
if (smaliCompiled != null) {
|
if (smaliCompiled != null) {
|
||||||
ClassNode newNode = JarUtils.getNode(smaliCompiled);
|
try
|
||||||
BytecodeViewer.updateNode(origNode, newNode);
|
{
|
||||||
|
ClassNode newNode = JarUtils.getNode(smaliCompiled);
|
||||||
|
BytecodeViewer.updateNode(origNode, newNode);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
BytecodeViewer.showMessage("There has been an error with assembling your Smali code, please check this. Class: " + origNode.name);
|
BytecodeViewer.showMessage("There has been an error with assembling your Smali code, please check this. Class: " + origNode.name);
|
||||||
BytecodeViewer.viewer.setIcon(false);
|
BytecodeViewer.viewer.setIcon(false);
|
||||||
|
@ -767,8 +773,15 @@ public class BytecodeViewer
|
||||||
String krakatauText = (String) krakatau[1];
|
String krakatauText = (String) krakatau[1];
|
||||||
byte[] krakatauCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.krakatau.compile(krakatauText, origNode.name);
|
byte[] krakatauCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.krakatau.compile(krakatauText, origNode.name);
|
||||||
if (krakatauCompiled != null) {
|
if (krakatauCompiled != null) {
|
||||||
ClassNode newNode = JarUtils.getNode(krakatauCompiled);
|
try
|
||||||
BytecodeViewer.updateNode(origNode, newNode);
|
{
|
||||||
|
ClassNode newNode = JarUtils.getNode(krakatauCompiled);
|
||||||
|
BytecodeViewer.updateNode(origNode, newNode);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
BytecodeViewer.showMessage("There has been an error with assembling your Krakatau Bytecode, please check this. Class: " + origNode.name);
|
BytecodeViewer.showMessage("There has been an error with assembling your Krakatau Bytecode, please check this. Class: " + origNode.name);
|
||||||
BytecodeViewer.viewer.setIcon(false);
|
BytecodeViewer.viewer.setIcon(false);
|
||||||
|
@ -791,8 +804,15 @@ public class BytecodeViewer
|
||||||
|
|
||||||
byte[] javaCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.java.compile(javaText, origNode.name);
|
byte[] javaCompiled = the.bytecode.club.bytecodeviewer.compilers.Compiler.java.compile(javaText, origNode.name);
|
||||||
if (javaCompiled != null) {
|
if (javaCompiled != null) {
|
||||||
ClassNode newNode = JarUtils.getNode(javaCompiled);
|
try
|
||||||
BytecodeViewer.updateNode(origNode, newNode);
|
{
|
||||||
|
ClassNode newNode = JarUtils.getNode(javaCompiled);
|
||||||
|
BytecodeViewer.updateNode(origNode, newNode);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
errConsole.finished();
|
errConsole.finished();
|
||||||
} else {
|
} else {
|
||||||
errConsole.pretty();
|
errConsole.pretty();
|
||||||
|
|
|
@ -639,7 +639,7 @@ public class FileNavigationPane extends VisibleComponent implements
|
||||||
setIcon(Resources.textIcon);
|
setIcon(Resources.textIcon);
|
||||||
} else if (name.equals("decoded resources")) {
|
} else if (name.equals("decoded resources")) {
|
||||||
setIcon(Resources.decodedIcon);
|
setIcon(Resources.decodedIcon);
|
||||||
} else if (name.endsWith(".properties") || name.endsWith(".xml") || name.endsWith(".mf") || name.endsWith(".config") || name.endsWith(".cfg")) {
|
} else if (name.endsWith(".properties") || name.endsWith(".xml") || name.endsWith(".jsp") || name.endsWith(".mf") || name.endsWith(".config") || name.endsWith(".cfg")) {
|
||||||
setIcon(Resources.configIcon);
|
setIcon(Resources.configIcon);
|
||||||
} else if (node.getChildCount() <= 0) { //random file
|
} else if (node.getChildCount() <= 0) { //random file
|
||||||
setIcon(Resources.fileIcon);
|
setIcon(Resources.fileIcon);
|
||||||
|
|
|
@ -75,6 +75,7 @@ public class JarUtils {
|
||||||
final ClassNode cn = getNode(bytes);
|
final ClassNode cn = getNode(bytes);
|
||||||
container.classes.add(cn);
|
container.classes.add(cn);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
System.err.println("Skipping: " + name);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -255,7 +256,7 @@ public class JarUtils {
|
||||||
* @param bytez the class file's byte[]
|
* @param bytez the class file's byte[]
|
||||||
* @return the ClassNode instance
|
* @return the ClassNode instance
|
||||||
*/
|
*/
|
||||||
public static ClassNode getNode(final byte[] bytez) {
|
public static ClassNode getNode(final byte[] bytez) throws Exception {
|
||||||
ClassReader cr = new ClassReader(bytez);
|
ClassReader cr = new ClassReader(bytez);
|
||||||
ClassNode cn = new ClassNode();
|
ClassNode cn = new ClassNode();
|
||||||
try {
|
try {
|
||||||
|
@ -264,7 +265,7 @@ public class JarUtils {
|
||||||
try {
|
try {
|
||||||
cr.accept(cn, ClassReader.SKIP_FRAMES);
|
cr.accept(cn, ClassReader.SKIP_FRAMES);
|
||||||
} catch (Exception e2) {
|
} catch (Exception e2) {
|
||||||
e2.printStackTrace(); //just skip it
|
throw e2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cr = null;
|
cr = null;
|
||||||
|
|
Loading…
Reference in a new issue