diff --git a/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java b/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java index c8838913..4817d33e 100644 --- a/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java +++ b/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java @@ -121,7 +121,6 @@ public class BytecodeViewer { /* ASM Re-mapping Constants */ public static Refactorer refactorer = new Refactorer(); - public static List main_classes = new ArrayList<>(); /* ASM Re-mapping Constants */ /** diff --git a/src/the/bytecode/club/bytecodeviewer/obfuscators/rename/RenameClasses.java b/src/the/bytecode/club/bytecodeviewer/obfuscators/rename/RenameClasses.java index e9addb00..e5aa29ab 100644 --- a/src/the/bytecode/club/bytecodeviewer/obfuscators/rename/RenameClasses.java +++ b/src/the/bytecode/club/bytecodeviewer/obfuscators/rename/RenameClasses.java @@ -27,15 +27,15 @@ public class RenameClasses extends JavaObfuscator { System.out.println("Obfuscating class names..."); classLoop: for (ClassNode c : BytecodeViewer.getLoadedClasses()) { - /** As we dont want to rename classes the user specified as main-classes */ - for (String name : BytecodeViewer.main_classes) { - if (name.equals(c.name)) - continue classLoop; - } - /** As we dont want to rename classes that contain native dll methods */ for (Object o : c.methods) { MethodNode m = (MethodNode) o; + + /** As we dont want to rename any main-classes */ + if (m.name.equals("main") && m.desc.equals("([Ljava/lang/String;)V") + || m.name.equals("init") && c.superName.equals("java/applet/Applet")) + continue classLoop; + /* As we dont want to rename native dll methods */ if ((m.access & Opcodes.ACC_NATIVE) != 0) continue classLoop;