Optimize various stuff
This commit is contained in:
parent
dac8dcc6c7
commit
86fb69f694
53 changed files with 253 additions and 454 deletions
|
@ -1,14 +1,14 @@
|
|||
import the.bytecode.club.bytecodeviewer.api.*;
|
||||
import java.util.ArrayList;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import the.bytecode.club.bytecodeviewer.decompilers.*;
|
||||
import org.objectweb.asm.tree.ClassNode
|
||||
import the.bytecode.club.bytecodeviewer.api.Plugin
|
||||
import the.bytecode.club.bytecodeviewer.api.PluginConsole
|
||||
|
||||
public class Skeleton extends Plugin {
|
||||
class Skeleton extends Plugin {
|
||||
|
||||
@Override
|
||||
public void execute(ArrayList<ClassNode> classNodesList) {
|
||||
PluginConsole gui = new PluginConsole("Skeleton");
|
||||
gui.setVisible(true);
|
||||
gui.appendText("executed skeleton");
|
||||
void execute(List<ClassNode> classNodesList) {
|
||||
PluginConsole gui = new PluginConsole("Skeleton")
|
||||
gui.setVisible(true)
|
||||
gui.appendText("executed skeleton")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,52 +1,54 @@
|
|||
import the.bytecode.club.bytecodeviewer.api.*
|
||||
import the.bytecode.club.bytecodeviewer.gui.components.MultipleChoiceDialog;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.lang.reflect.Field;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import org.objectweb.asm.tree.ClassNode
|
||||
import org.objectweb.asm.tree.FieldNode
|
||||
import the.bytecode.club.bytecodeviewer.api.BCV
|
||||
import the.bytecode.club.bytecodeviewer.api.Plugin
|
||||
import the.bytecode.club.bytecodeviewer.api.PluginConsole
|
||||
import the.bytecode.club.bytecodeviewer.gui.components.MultipleChoiceDialog
|
||||
|
||||
import static the.bytecode.club.bytecodeviewer.Constants.nl;
|
||||
import java.lang.reflect.Field
|
||||
|
||||
import static the.bytecode.club.bytecodeviewer.Constants.nl
|
||||
|
||||
/**
|
||||
* This is an example of a string decrypter plugin
|
||||
*/
|
||||
public class ExampleStringDecrypter extends Plugin {
|
||||
class ExampleStringDecrypter extends Plugin {
|
||||
|
||||
@Override
|
||||
public void execute(ArrayList<ClassNode> classNodesList) {
|
||||
PluginConsole gui = new PluginConsole("Example String Decrypter");
|
||||
void execute(List<ClassNode> classNodesList) {
|
||||
PluginConsole gui = new PluginConsole("Example String Decrypter")
|
||||
|
||||
MultipleChoiceDialog dialog = new MultipleChoiceDialog("Bytecode Viewer - WARNING",
|
||||
"WARNING: This will load the classes into the JVM and execute the initialize function"
|
||||
+ nl + "for each class. IF THE FILE YOU'RE LOADING IS MALICIOUS, DO NOT CONTINUE.",
|
||||
new String[]{"Continue", "Cancel"});
|
||||
new String[]{"Continue", "Cancel"})
|
||||
|
||||
if(dialog.promptChoice() == 0)
|
||||
{
|
||||
for(ClassNode cn : classNodesList)
|
||||
{
|
||||
BCV.getClassNodeLoader().addClass(cn);
|
||||
BCV.getClassNodeLoader().addClass(cn)
|
||||
|
||||
for(Object o : cn.fields.toArray())
|
||||
{
|
||||
FieldNode f = (FieldNode) o;
|
||||
if(f.name.equals("z")) {// && f.desc.equals("([Ljava/lang/String;)V")) {
|
||||
FieldNode f = (FieldNode) o
|
||||
if(f.name == "z") {// && f.desc.equals("([Ljava/lang/String;)V")) {
|
||||
try
|
||||
{
|
||||
for(Field f2 : BCV.getClassNodeLoader().nodeToClass(cn).getFields())
|
||||
{
|
||||
String s = f2.get(null);
|
||||
if(s != null && !s.empty())
|
||||
gui.appendText(cn+":"+s);
|
||||
String s = f2.get(null)
|
||||
if(s != null && !s.empty)
|
||||
gui.appendText(cn + ":" + s)
|
||||
}
|
||||
} catch(Exception | StackOverflowError e) {}
|
||||
} catch(Exception | StackOverflowError ignored) {}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
gui.setVisible(true);
|
||||
gui.setVisible(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue