Updated For Plugin API Changes
This will make it easier on the user to inform them which file the class resources are in
This commit is contained in:
parent
fc68fde546
commit
1eda5e7f78
15 changed files with 28 additions and 19 deletions
|
@ -15,7 +15,7 @@ public class ExampleStringDecrypter extends Plugin {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodesList) {
|
public void execute(ArrayList<ClassNode> classNodesList) {
|
||||||
PluginConsole gui = new PluginConsole("Example String Decrypter");
|
PluginConsole gui = new PluginConsole(activeContainer.name + "Example String Decrypter");
|
||||||
|
|
||||||
MultipleChoiceDialogue dialogue = new MultipleChoiceDialogue("Bytecode Viewer - WARNING",
|
MultipleChoiceDialogue dialogue = new MultipleChoiceDialogue("Bytecode Viewer - WARNING",
|
||||||
"WARNING: This will load the classes into the JVM and execute the initialize function"
|
"WARNING: This will load the classes into the JVM and execute the initialize function"
|
||||||
|
|
|
@ -45,7 +45,6 @@ import static the.bytecode.club.bytecodeviewer.Constants.nl;
|
||||||
|
|
||||||
public class AllatoriStringDecrypter extends Plugin
|
public class AllatoriStringDecrypter extends Plugin
|
||||||
{
|
{
|
||||||
final PluginConsole frame = new PluginConsole("Allatori String Decrypter");
|
|
||||||
final StringBuilder out = new StringBuilder();
|
final StringBuilder out = new StringBuilder();
|
||||||
final String className;
|
final String className;
|
||||||
|
|
||||||
|
@ -54,6 +53,8 @@ public class AllatoriStringDecrypter extends Plugin
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
|
PluginConsole frame = new PluginConsole(activeContainer.name + " - Allatori String Decrypter");
|
||||||
|
|
||||||
MultipleChoiceDialogue dialogue = new MultipleChoiceDialogue("Bytecode Viewer - WARNING",
|
MultipleChoiceDialogue dialogue = new MultipleChoiceDialogue("Bytecode Viewer - WARNING",
|
||||||
"WARNING: This will load the classes into the JVM and execute the allatori decrypter function"
|
"WARNING: This will load the classes into the JVM and execute the allatori decrypter function"
|
||||||
+ nl + "for each class. IF THE FILE YOU'RE LOADING IS MALICIOUS, DO NOT CONTINUE.",
|
+ nl + "for each class. IF THE FILE YOU'RE LOADING IS MALICIOUS, DO NOT CONTINUE.",
|
||||||
|
|
|
@ -51,7 +51,6 @@ public class EZInjection extends Plugin
|
||||||
{
|
{
|
||||||
public static ArrayList<BytecodeHook> hookArray = new ArrayList<>();
|
public static ArrayList<BytecodeHook> hookArray = new ArrayList<>();
|
||||||
private static final String version = "1.0";
|
private static final String version = "1.0";
|
||||||
private static final PluginConsole gui = new PluginConsole("EZ Injection v" + version);
|
|
||||||
private final boolean accessModifiers;
|
private final boolean accessModifiers;
|
||||||
private final boolean injectHooks;
|
private final boolean injectHooks;
|
||||||
private final boolean invokeMethod;
|
private final boolean invokeMethod;
|
||||||
|
@ -140,7 +139,7 @@ public class EZInjection extends Plugin
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
BytecodeViewer.updateBusyStatus(true);
|
PluginConsole gui = new PluginConsole(activeContainer.name + " - EZ Injection v" + version);
|
||||||
|
|
||||||
gui.setText("");
|
gui.setText("");
|
||||||
|
|
||||||
|
@ -328,7 +327,5 @@ public class EZInjection extends Plugin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BytecodeViewer.updateBusyStatus(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class MaliciousCodeScanner extends Plugin
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
PluginConsole frame = new PluginConsole("Malicious Code Scanner");
|
PluginConsole frame = new PluginConsole(activeContainer.name + " - Malicious Code Scanner");
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
HashSet<String> scanOptions = new HashSet<>();
|
HashSet<String> scanOptions = new HashSet<>();
|
||||||
|
|
|
@ -36,7 +36,7 @@ import the.bytecode.club.bytecodeviewer.api.PluginConsole;
|
||||||
|
|
||||||
public class ReplaceStrings extends Plugin
|
public class ReplaceStrings extends Plugin
|
||||||
{
|
{
|
||||||
PluginConsole frame = new PluginConsole("Replace Strings");
|
PluginConsole frame;
|
||||||
String originalLDC;
|
String originalLDC;
|
||||||
String newLDC;
|
String newLDC;
|
||||||
String className;
|
String className;
|
||||||
|
@ -53,6 +53,8 @@ public class ReplaceStrings extends Plugin
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
|
frame = new PluginConsole(activeContainer.name + " - Replace Strings");
|
||||||
|
|
||||||
if (!className.equals("*"))
|
if (!className.equals("*"))
|
||||||
{
|
{
|
||||||
for (ClassNode classNode : classNodeList)
|
for (ClassNode classNode : classNodeList)
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class ShowAllStrings extends Plugin
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
PluginConsole frame = new PluginConsole("Show All Strings");
|
PluginConsole frame = new PluginConsole(activeContainer.name + " - Show All Strings");
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
for (ClassNode classNode : classNodeList)
|
for (ClassNode classNode : classNodeList)
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ShowMainMethods extends Plugin
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
PluginConsole frame = new PluginConsole("Show Main Methods");
|
PluginConsole frame = new PluginConsole(activeContainer.name + " - Show Main Methods");
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
for (ClassNode classNode : classNodeList)
|
for (ClassNode classNode : classNodeList)
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class StackFramesRemover extends Plugin
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
AtomicInteger counter = new AtomicInteger();
|
AtomicInteger counter = new AtomicInteger();
|
||||||
PluginConsole frame = new PluginConsole("StackFrames Remover");
|
PluginConsole frame = new PluginConsole(activeContainer.name + " - StackFrames Remover");
|
||||||
for (ClassNode cn : classNodeList)
|
for (ClassNode cn : classNodeList)
|
||||||
{
|
{
|
||||||
for (MethodNode mn : cn.methods)
|
for (MethodNode mn : cn.methods)
|
||||||
|
|
|
@ -17,7 +17,7 @@ public class ViewAPKAndroidPermissions extends Plugin
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
PluginConsole frame = new PluginConsole("Android Permissions");
|
PluginConsole frame = new PluginConsole(activeContainer.name + " - Android Permissions");
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
byte[] encodedAndroidManifest = BytecodeViewer.getFileContents("AndroidManifest.xml");
|
byte[] encodedAndroidManifest = BytecodeViewer.getFileContents("AndroidManifest.xml");
|
||||||
|
|
|
@ -17,7 +17,7 @@ public class ViewManifest extends Plugin
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
PluginConsole frame = new PluginConsole("View Manifest");
|
PluginConsole frame = new PluginConsole(activeContainer.name + " - View Manifest");
|
||||||
frame.setVisible(true);
|
frame.setVisible(true);
|
||||||
|
|
||||||
//TODO android APKs may have AndroidManifests that can be viewed normally, this should be checked
|
//TODO android APKs may have AndroidManifests that can be viewed normally, this should be checked
|
||||||
|
|
|
@ -41,12 +41,12 @@ import static the.bytecode.club.bytecodeviewer.Constants.*;
|
||||||
|
|
||||||
public class ZStringArrayDecrypter extends Plugin
|
public class ZStringArrayDecrypter extends Plugin
|
||||||
{
|
{
|
||||||
PluginConsole gui = new PluginConsole("ZStringArray Decrypter");
|
|
||||||
StringBuilder out = new StringBuilder();
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
|
PluginConsole gui = new PluginConsole(activeContainer.name + " - ZStringArray Decrypter");
|
||||||
|
StringBuilder out = new StringBuilder();
|
||||||
|
|
||||||
MultipleChoiceDialogue dialogue = new MultipleChoiceDialogue("Bytecode Viewer - WARNING",
|
MultipleChoiceDialogue dialogue = new MultipleChoiceDialogue("Bytecode Viewer - WARNING",
|
||||||
"WARNING: This will load the classes into the JVM and execute the initialize function"
|
"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.",
|
+ nl + "for each class. IF THE FILE YOU'RE LOADING IS MALICIOUS, DO NOT CONTINUE.",
|
||||||
|
|
|
@ -62,6 +62,10 @@ public class JavascriptPluginLaunchStrategy implements PluginLaunchStrategy
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
//add the active container as a global variable to the JS script
|
||||||
|
finalEngine.put("activeContainer", activeContainer);
|
||||||
|
|
||||||
|
//invoke the JS function
|
||||||
((Invocable) finalEngine).invokeFunction("execute", classNodeList);
|
((Invocable) finalEngine).invokeFunction("execute", classNodeList);
|
||||||
}
|
}
|
||||||
catch (NoSuchMethodException | ScriptException e)
|
catch (NoSuchMethodException | ScriptException e)
|
||||||
|
|
|
@ -4,7 +4,7 @@ import org.objectweb.asm.tree.ClassNode;
|
||||||
|
|
||||||
public class Template extends Plugin
|
public class Template extends Plugin
|
||||||
{
|
{
|
||||||
PluginConsole gui = new PluginConsole("Java Template");
|
PluginConsole gui;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function
|
* Main function
|
||||||
|
@ -12,7 +12,11 @@ public class Template extends Plugin
|
||||||
@Override
|
@Override
|
||||||
public void execute(ArrayList<ClassNode> classNodeList)
|
public void execute(ArrayList<ClassNode> classNodeList)
|
||||||
{
|
{
|
||||||
|
//create console
|
||||||
|
gui = new PluginConsole(activeContainer.name + "Java Template");
|
||||||
gui.setVisible(true); //show the console
|
gui.setVisible(true); //show the console
|
||||||
|
|
||||||
|
//debug text
|
||||||
out("Class Nodes: " + classNodeList.size());
|
out("Class Nodes: " + classNodeList.size());
|
||||||
|
|
||||||
//iterate through each class node
|
//iterate through each class node
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
var BCV = Java.type("the.bytecode.club.bytecodeviewer.api.BCV");
|
var BCV = Java.type("the.bytecode.club.bytecodeviewer.api.BCV");
|
||||||
var PluginConsole = Java.type("the.bytecode.club.bytecodeviewer.api.PluginConsole");
|
var PluginConsole = Java.type("the.bytecode.club.bytecodeviewer.api.PluginConsole");
|
||||||
var gui = new PluginConsole("Javascript Template");
|
var gui;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main function
|
* Main function
|
||||||
*/
|
*/
|
||||||
function execute(classNodeList)
|
function execute(classNodeList)
|
||||||
{
|
{
|
||||||
|
gui = new PluginConsole(activeContainer.name + "Javascript Template");
|
||||||
gui.setVisible(true); //show the console
|
gui.setVisible(true); //show the console
|
||||||
out("Class Nodes: " + classNodeList.size());
|
out("Class Nodes: " + classNodeList.size());
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue