Added checking for main-classes
This commit is contained in:
parent
d4611106cb
commit
a00d48ee7b
2 changed files with 8 additions and 0 deletions
|
@ -14,6 +14,7 @@ import java.net.URI;
|
|||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.swing.JDialog;
|
||||
|
@ -120,6 +121,7 @@ public class BytecodeViewer {
|
|||
|
||||
/* ASM Re-mapping Constants */
|
||||
public static Refactorer refactorer = new Refactorer();
|
||||
public static List<String> main_classes = new ArrayList<>();
|
||||
/* ASM Re-mapping Constants */
|
||||
|
||||
/**
|
||||
|
|
|
@ -27,6 +27,12 @@ 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;
|
||||
|
|
Loading…
Reference in a new issue