diff --git a/plugins/example/ExampleStringDecrypter.gy b/plugins/example/ExampleStringDecrypter.gy index 2c260f01..86f9216e 100644 --- a/plugins/example/ExampleStringDecrypter.gy +++ b/plugins/example/ExampleStringDecrypter.gy @@ -26,7 +26,7 @@ public class ExampleStringDecrypter extends Plugin { { for(ClassNode cn : classNodesList) { - the.bytecode.club.bytecodeviewer.api.BytecodeViewer.getClassNodeLoader().addClass(cn); + BCV.getClassNodeLoader().addClass(cn); for(Object o : cn.fields.toArray()) { @@ -34,7 +34,7 @@ public class ExampleStringDecrypter extends Plugin { if(f.name.equals("z")) {// && f.desc.equals("([Ljava/lang/String;)V")) { try { - for(Field f2 : the.bytecode.club.bytecodeviewer.api.BytecodeViewer.getClassNodeLoader().nodeToClass(cn).getFields()) + for(Field f2 : BCV.getClassNodeLoader().nodeToClass(cn).getFields()) { String s = f2.get(null); if(s != null && !s.empty()) diff --git a/plugins/example/ExampleStringDecrypter.java b/plugins/example/ExampleStringDecrypter.java index 2c260f01..5b75264f 100644 --- a/plugins/example/ExampleStringDecrypter.java +++ b/plugins/example/ExampleStringDecrypter.java @@ -26,7 +26,7 @@ public class ExampleStringDecrypter extends Plugin { { for(ClassNode cn : classNodesList) { - the.bytecode.club.bytecodeviewer.api.BytecodeViewer.getClassNodeLoader().addClass(cn); + the.bytecode.club.bytecodeviewer.api.BCV.getClassNodeLoader().addClass(cn); for(Object o : cn.fields.toArray()) { @@ -34,7 +34,7 @@ public class ExampleStringDecrypter extends Plugin { if(f.name.equals("z")) {// && f.desc.equals("([Ljava/lang/String;)V")) { try { - for(Field f2 : the.bytecode.club.bytecodeviewer.api.BytecodeViewer.getClassNodeLoader().nodeToClass(cn).getFields()) + for(Field f2 : the.bytecode.club.bytecodeviewer.api.BCV.getClassNodeLoader().nodeToClass(cn).getFields()) { String s = f2.get(null); if(s != null && !s.empty()) diff --git a/plugins/example/ExampleStringDecrypter.js b/plugins/example/ExampleStringDecrypter.js index f9cb847d..a60ed8d8 100644 --- a/plugins/example/ExampleStringDecrypter.js +++ b/plugins/example/ExampleStringDecrypter.js @@ -4,7 +4,7 @@ var PluginConsole = Java.type("the.bytecode.club.bytecodeviewer.api.PluginConsole"); var MultipleChoiceDialogue = Java.type("the.bytecode.club.bytecodeviewer.gui.components.MultipleChoiceDialogue") -var BytecodeViewer = Java.type("the.bytecode.club.bytecodeviewer.api.BytecodeViewer") +var BytecodeViewer = Java.type("the.bytecode.club.bytecodeviewer.api.BCV") var dialogue = new MultipleChoiceDialogue("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/BytecodeViewer.java b/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java index ff7b371f..b13cc3fc 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/BytecodeViewer.java @@ -126,7 +126,7 @@ public class BytecodeViewer public static List createdProcesses = new ArrayList<>(); //Security Manager for dynamic analysis debugging - public static SecurityMan sm = new SecurityMan(); //might be insecure due to assholes targeting BCV, + public static SecurityMan sm = new SecurityMan(); //might be insecure due to assholes targeting BCV //Refactorer public static Refactorer refactorer = new Refactorer(); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/api/BytecodeViewer.java b/src/main/java/the/bytecode/club/bytecodeviewer/api/BCV.java similarity index 97% rename from src/main/java/the/bytecode/club/bytecodeviewer/api/BytecodeViewer.java rename to src/main/java/the/bytecode/club/bytecodeviewer/api/BCV.java index 0698a351..2025ec8b 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/api/BytecodeViewer.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/api/BCV.java @@ -41,14 +41,15 @@ import static the.bytecode.club.bytecodeviewer.Constants.*; ***************************************************************************/ /** - * The official API for BCV, this was designed for plugin authors and - * people utilizing EZ-Injection. + * The official API for BCV, this was designed for plugin authors and developers utilizing EZ-Injection. + * + * The BCV Class is meant to to help aid in dynamic analysis and plugin utility. * * @author Konloch */ -public class BytecodeViewer +public class BCV { - private static ClassNodeLoader loader = new ClassNodeLoader(); //might be insecure due to assholes targeting BCV, + private static ClassNodeLoader loader = new ClassNodeLoader(); //might be insecure due to assholes targeting BCV private static URLClassLoader cl; /** @@ -94,7 +95,7 @@ public class BytecodeViewer { File f = new File(tempDirectory + fs + MiscUtils.randomString(12) + "loaded_temp.jar"); - JarUtils.saveAsJar(BytecodeViewer.getLoadedClasses(), f.getAbsolutePath()); + JarUtils.saveAsJar(BCV.getLoadedClasses(), f.getAbsolutePath()); JarFile jarFile = new JarFile("" + f.getAbsolutePath()); Enumeration e = jarFile.entries(); diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/RunOptions.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/RunOptions.java index 49c7fa9e..c69764c5 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/RunOptions.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/components/RunOptions.java @@ -105,10 +105,10 @@ public class RunOptions extends JFrame console.setSelected(true); getContentPane().add(console); - final JCheckBox chckbxPrintToTerminal = new JCheckBox("Print To Command Line"); - chckbxPrintToTerminal.setSelected(true); - chckbxPrintToTerminal.setBounds(6, 315, 232, 23); - getContentPane().add(chckbxPrintToTerminal); + final JCheckBox printToCommandLine = new JCheckBox("Print To Command Line"); + printToCommandLine.setSelected(true); + printToCommandLine.setBounds(6, 315, 232, 23); + getContentPane().add(printToCommandLine); this.setLocationRelativeTo(null); btnNewButton.addActionListener(arg0 -> { PluginManager.runPlugin(new EZInjection(accessModifiers @@ -119,7 +119,7 @@ public class RunOptions extends JFrame .getText(), this.socksProxy.getText(), forceProxy .isSelected(), launchReflectionKit.isSelected(), console.isSelected(), - chckbxPrintToTerminal.isSelected())); + printToCommandLine.isSelected())); dispose(); }); } 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 88921df7..b88f4b2b 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 @@ -9,10 +9,7 @@ import org.objectweb.asm.tree.*; import the.bytecode.club.bytecodeviewer.BytecodeViewer; import the.bytecode.club.bytecodeviewer.Constants; import the.bytecode.club.bytecodeviewer.Resources; -import the.bytecode.club.bytecodeviewer.api.ASMUtil; -import the.bytecode.club.bytecodeviewer.api.ExceptionUI; -import the.bytecode.club.bytecodeviewer.api.Plugin; -import the.bytecode.club.bytecodeviewer.api.PluginConsole; +import the.bytecode.club.bytecodeviewer.api.*; import the.bytecode.club.bytecodeviewer.gui.components.MultipleChoiceDialogue; import the.bytecode.club.bytecodeviewer.plugin.PluginManager; @@ -169,7 +166,7 @@ public class AllatoriStringDecrypter extends Plugin { System.out.println("Loading " + decrypterClassName); - Class decrypterClassList = the.bytecode.club.bytecodeviewer.api.BytecodeViewer + Class decrypterClassList = BCV .loadClassIntoClassLoader(decrypterClassNode); String decrypted = invokeDecrypter(decrypterClassList, decrypterMethodName, (String) laststringldconstack.cst); 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 3b5ce554..ed08da13 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 @@ -11,6 +11,7 @@ import org.objectweb.asm.tree.LdcInsnNode; import org.objectweb.asm.tree.MethodInsnNode; import org.objectweb.asm.tree.MethodNode; import the.bytecode.club.bytecodeviewer.BytecodeViewer; +import the.bytecode.club.bytecodeviewer.api.BCV; import the.bytecode.club.bytecodeviewer.api.BytecodeHook; import the.bytecode.club.bytecodeviewer.api.Plugin; import the.bytecode.club.bytecodeviewer.api.PluginConsole; @@ -71,7 +72,7 @@ public class EZInjection extends Plugin { boolean useProxy, boolean launchKit, boolean console, boolean printCmdL) { - the.bytecode.club.bytecodeviewer.api.BytecodeViewer.createNewClassNodeLoaderInstance(); + BCV.createNewClassNodeLoaderInstance(); this.accessModifiers = accessModifiers; this.injectHooks = injectHooks; EZInjection.debugHooks = debugHooks; @@ -279,7 +280,7 @@ public class EZInjection extends Plugin { // load all the classnodes into the classloader for (ClassNode cn : BytecodeViewer.getLoadedClasses()) - the.bytecode.club.bytecodeviewer.api.BytecodeViewer.getClassNodeLoader().addClass(cn); + BCV.getClassNodeLoader().addClass(cn); print("Attempting to find " + invokeMethodInformation + ":" + nl + nl); @@ -292,7 +293,7 @@ public class EZInjection extends Plugin { if (invokeMethodInformation.equals(methodInformation)) { - for (Method m2 : the.bytecode.club.bytecodeviewer.api.BytecodeViewer + for (Method m2 : BCV .getClassNodeLoader().nodeToClass(classNode) .getMethods()) { 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 7cff9921..428a6127 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 @@ -4,10 +4,10 @@ import java.lang.reflect.Field; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Objects; -import javax.swing.JDialog; -import javax.swing.JOptionPane; + import org.objectweb.asm.tree.ClassNode; import the.bytecode.club.bytecodeviewer.BytecodeViewer; +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.MultipleChoiceDialogue; @@ -56,7 +56,7 @@ public class ZStringArrayDecrypter extends Plugin { boolean needsWarning = false; for (Class cn : - Objects.requireNonNull(the.bytecode.club.bytecodeviewer.api.BytecodeViewer.loadClassesIntoClassLoader())) + Objects.requireNonNull(BCV.loadClassesIntoClassLoader())) { try { diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/util/BCVResourceUtils.java b/src/main/java/the/bytecode/club/bytecodeviewer/util/BCVResourceUtils.java index 50f2f823..8421d744 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/util/BCVResourceUtils.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/util/BCVResourceUtils.java @@ -2,7 +2,7 @@ package the.bytecode.club.bytecodeviewer.util; import the.bytecode.club.bytecodeviewer.BytecodeViewer; import the.bytecode.club.bytecodeviewer.Configuration; -import the.bytecode.club.bytecodeviewer.gui.components.MultipleChoiceDialogue; +import the.bytecode.club.bytecodeviewer.api.BCV; import java.io.File; @@ -22,7 +22,7 @@ public class BCVResourceUtils BytecodeViewer.viewer.resourcePane.resetWorkspace(); BytecodeViewer.viewer.workPane.resetWorkspace(); BytecodeViewer.viewer.searchBoxPane.resetWorkspace(); - the.bytecode.club.bytecodeviewer.api.BytecodeViewer.getClassNodeLoader().clear(); + BCV.getClassNodeLoader().clear(); } /** diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/util/SecurityMan.java b/src/main/java/the/bytecode/club/bytecodeviewer/util/SecurityMan.java index 50235820..99d53321 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/util/SecurityMan.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/util/SecurityMan.java @@ -32,7 +32,7 @@ import java.security.Permission; public class SecurityMan extends SecurityManager { - private boolean blocking = true; //might be insecure due to assholes targeting BCV, however that's highly unlikely. + private boolean blocking = true; //might be insecure due to assholes targeting BCV private boolean printing = false; private boolean printingPackage = false; diff --git a/src/main/resources/templates/Template_Plugin.java b/src/main/resources/templates/Template_Plugin.java index 913329e1..d01cde6d 100644 --- a/src/main/resources/templates/Template_Plugin.java +++ b/src/main/resources/templates/Template_Plugin.java @@ -19,7 +19,7 @@ public class Template extends Plugin for(ClassNode cn : classNodeList) process(cn); - BytecodeViewer.hideFrame(gui, 10000); //hides the console after 10 seconds + BCV.hideFrame(gui, 10000); //hides the console after 10 seconds } /** diff --git a/src/main/resources/templates/Template_Plugin.js b/src/main/resources/templates/Template_Plugin.js index 5b705ebc..3e9074af 100644 --- a/src/main/resources/templates/Template_Plugin.js +++ b/src/main/resources/templates/Template_Plugin.js @@ -1,4 +1,4 @@ -var BCV = Java.type("the.bytecode.club.bytecodeviewer.api.BytecodeViewer"); +var BCV = Java.type("the.bytecode.club.bytecodeviewer.api.BCV"); var PluginConsole = Java.type("the.bytecode.club.bytecodeviewer.api.PluginConsole"); var gui = new PluginConsole("Javascript Template");