Added checking for main-classes

This commit is contained in:
im-frizzy 2015-02-28 22:19:51 -06:00
parent d4611106cb
commit a00d48ee7b

AI 샘플 코드 생성 중입니다

Loading...
2 changed files with 8 additions and 0 deletions

View File

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

View File

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