BCV API Change

This API change will break compatibility with most pre-existing plugins
This commit is contained in:
Konloch 2021-07-06 21:36:11 -07:00
parent 7eda960981
commit c5b53be4b8

AI 샘플 코드 생성 중입니다

Loading...
13 changed files with 31 additions and 32 deletions

View File

@ -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())

View File

@ -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())

View File

@ -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"

View File

@ -126,7 +126,7 @@ public class BytecodeViewer
public static List<Process> 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();

View File

@ -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<JarEntry> e = jarFile.entries();

View File

@ -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();
});
}

View File

@ -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);

View File

@ -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())
{

View File

@ -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
{

View File

@ -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();
}
/**

View File

@ -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;

View File

@ -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
}
/**

View File

@ -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");