From 84c1834ada6f3754d02bb2a09df1fe8755a8249b Mon Sep 17 00:00:00 2001 From: Konloch Date: Fri, 23 Jul 2021 15:50:18 -0700 Subject: [PATCH] Plugin API Update With the plugin manager tab changes the plugin console no longer needs the active resource container name. It only needs the plugin name --- plugins/example/ExampleStringDecrypter.java | 2 +- .../plugin/preinstalled/AllatoriStringDecrypter.java | 2 +- .../club/bytecodeviewer/plugin/preinstalled/EZInjection.java | 2 +- .../plugin/preinstalled/MaliciousCodeScanner.java | 2 +- .../club/bytecodeviewer/plugin/preinstalled/ReplaceStrings.java | 2 +- .../club/bytecodeviewer/plugin/preinstalled/ShowAllStrings.java | 2 +- .../bytecodeviewer/plugin/preinstalled/ShowMainMethods.java | 2 +- .../bytecodeviewer/plugin/preinstalled/StackFramesRemover.java | 2 +- .../plugin/preinstalled/ViewAPKAndroidPermissions.java | 2 +- .../club/bytecodeviewer/plugin/preinstalled/ViewManifest.java | 2 +- .../plugin/preinstalled/ZStringArrayDecrypter.java | 2 +- src/main/resources/templates/Template_Plugin.java | 2 +- src/main/resources/templates/Template_Plugin.js | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/example/ExampleStringDecrypter.java b/plugins/example/ExampleStringDecrypter.java index 2a3fe5d0..756dd3d5 100644 --- a/plugins/example/ExampleStringDecrypter.java +++ b/plugins/example/ExampleStringDecrypter.java @@ -15,7 +15,7 @@ public class ExampleStringDecrypter extends Plugin { @Override public void execute(ArrayList classNodesList) { - PluginConsole gui = new PluginConsole(activeContainer.name + " - Example String Decrypter"); + 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" diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypter.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypter.java index 08d0aad2..d8f1899a 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypter.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/AllatoriStringDecrypter.java @@ -53,7 +53,7 @@ public class AllatoriStringDecrypter extends Plugin @Override public void execute(ArrayList classNodeList) { - PluginConsole frame = new PluginConsole(activeContainer.name + " - Allatori String Decrypter"); + PluginConsole frame = new PluginConsole("Allatori String Decrypter"); MultipleChoiceDialog dialog = new MultipleChoiceDialog("Bytecode Viewer - WARNING", "WARNING: This will load the classes into the JVM and execute the allatori decrypter function" diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/EZInjection.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/EZInjection.java index 8dc2f38f..9bc99fd4 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/EZInjection.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/EZInjection.java @@ -140,7 +140,7 @@ public class EZInjection extends Plugin public void execute(ArrayList classNodeList) { if(console) - new PluginConsole(activeContainer.name + " - EZ Injection v" + version); + new PluginConsole("EZ Injection v" + version); if (accessModifiers) print("Setting all of the access modifiers to public/public static."); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/MaliciousCodeScanner.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/MaliciousCodeScanner.java index 5b3aca75..54e7b69d 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/MaliciousCodeScanner.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/MaliciousCodeScanner.java @@ -51,7 +51,7 @@ public class MaliciousCodeScanner extends Plugin @Override public void execute(ArrayList classNodeList) { - PluginConsole frame = new PluginConsole(activeContainer.name + " - Malicious Code Scanner"); + PluginConsole frame = new PluginConsole("Malicious Code Scanner"); StringBuilder sb = new StringBuilder(); HashSet scanOptions = new HashSet<>(); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ReplaceStrings.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ReplaceStrings.java index 5d99113f..d40e4175 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ReplaceStrings.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ReplaceStrings.java @@ -53,7 +53,7 @@ public class ReplaceStrings extends Plugin @Override public void execute(ArrayList classNodeList) { - frame = new PluginConsole(activeContainer.name + " - Replace Strings"); + frame = new PluginConsole("Replace Strings"); if (!className.equals("*")) { diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ShowAllStrings.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ShowAllStrings.java index 6cc04719..cc1f2cc4 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ShowAllStrings.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ShowAllStrings.java @@ -44,7 +44,7 @@ public class ShowAllStrings extends Plugin @Override public void execute(ArrayList classNodeList) { - PluginConsole frame = new PluginConsole(activeContainer.name + " - Show All Strings"); + PluginConsole frame = new PluginConsole("Show All Strings"); StringBuilder sb = new StringBuilder(); for (ClassNode classNode : classNodeList) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ShowMainMethods.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ShowMainMethods.java index be58268b..e8f2c327 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ShowMainMethods.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ShowMainMethods.java @@ -39,7 +39,7 @@ public class ShowMainMethods extends Plugin @Override public void execute(ArrayList classNodeList) { - PluginConsole frame = new PluginConsole(activeContainer.name + " - Show Main Methods"); + PluginConsole frame = new PluginConsole("Show Main Methods"); StringBuilder sb = new StringBuilder(); for (ClassNode classNode : classNodeList) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/StackFramesRemover.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/StackFramesRemover.java index b6916535..4fb807ef 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/StackFramesRemover.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/StackFramesRemover.java @@ -15,7 +15,7 @@ public class StackFramesRemover extends Plugin public void execute(ArrayList classNodeList) { AtomicInteger counter = new AtomicInteger(); - PluginConsole frame = new PluginConsole(activeContainer.name + " - StackFrames Remover"); + PluginConsole frame = new PluginConsole("StackFrames Remover"); for (ClassNode cn : classNodeList) { for (MethodNode mn : cn.methods) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ViewAPKAndroidPermissions.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ViewAPKAndroidPermissions.java index b4f09b29..f22f9ecd 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ViewAPKAndroidPermissions.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ViewAPKAndroidPermissions.java @@ -17,7 +17,7 @@ public class ViewAPKAndroidPermissions extends Plugin @Override public void execute(ArrayList classNodeList) { - PluginConsole frame = new PluginConsole(activeContainer.name + " - Android Permissions"); + PluginConsole frame = new PluginConsole("Android Permissions"); frame.setVisible(true); byte[] encodedAndroidManifest = activeContainer.getFileContents("AndroidManifest.xml"); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ViewManifest.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ViewManifest.java index 44deb880..2c34fca3 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ViewManifest.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ViewManifest.java @@ -17,7 +17,7 @@ public class ViewManifest extends Plugin @Override public void execute(ArrayList classNodeList) { - PluginConsole frame = new PluginConsole(activeContainer.name + " - View Manifest"); + PluginConsole frame = new PluginConsole("View Manifest"); frame.setVisible(true); //TODO android APKs may have AndroidManifests that can be viewed normally, this should be checked diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ZStringArrayDecrypter.java b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ZStringArrayDecrypter.java index e8c14a38..e33b1819 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ZStringArrayDecrypter.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/plugin/preinstalled/ZStringArrayDecrypter.java @@ -44,7 +44,7 @@ public class ZStringArrayDecrypter extends Plugin @Override public void execute(ArrayList classNodeList) { - PluginConsole gui = new PluginConsole(activeContainer.name + " - ZStringArray Decrypter"); + PluginConsole gui = new PluginConsole("ZStringArray Decrypter"); StringBuilder out = new StringBuilder(); MultipleChoiceDialog dialog = new MultipleChoiceDialog("Bytecode Viewer - WARNING", diff --git a/src/main/resources/templates/Template_Plugin.java b/src/main/resources/templates/Template_Plugin.java index 76b5d7f9..94d7359d 100644 --- a/src/main/resources/templates/Template_Plugin.java +++ b/src/main/resources/templates/Template_Plugin.java @@ -13,7 +13,7 @@ public class Template extends Plugin public void execute(ArrayList classNodeList) { //create console - gui = new PluginConsole(activeContainer.name + " - Java Template"); + gui = new PluginConsole("Java Template"); gui.setVisible(true); //show the console //debug text diff --git a/src/main/resources/templates/Template_Plugin.js b/src/main/resources/templates/Template_Plugin.js index 1c3b9496..ad9d1baf 100644 --- a/src/main/resources/templates/Template_Plugin.js +++ b/src/main/resources/templates/Template_Plugin.js @@ -7,7 +7,7 @@ var gui; */ function execute(classNodeList) { - gui = new PluginConsole(activeContainer.name + " - Javascript Template"); + gui = new PluginConsole("Javascript Template"); gui.setVisible(true); //show the console out("Class Nodes: " + classNodeList.size());