diff options
| author | 2015-03-28 19:12:53 -0400 | |
|---|---|---|
| committer | 2015-03-28 19:12:53 -0400 | |
| commit | 698f4d025e0b9ee5bbd1bd701cc46c340b8b4d9c (patch) | |
| tree | 74a811e316554a56059035ebfb43bb610a21b081 /src/cuchaz/enigma/analysis/TranslationIndex.java | |
| parent | show bytecode line numbers for debugging (diff) | |
| download | enigma-fork-698f4d025e0b9ee5bbd1bd701cc46c340b8b4d9c.tar.gz enigma-fork-698f4d025e0b9ee5bbd1bd701cc46c340b8b4d9c.tar.xz enigma-fork-698f4d025e0b9ee5bbd1bd701cc46c340b8b4d9c.zip | |
add methods for better runtime obfuscation in M3L
Diffstat (limited to '')
| -rw-r--r-- | src/cuchaz/enigma/analysis/TranslationIndex.java | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/src/cuchaz/enigma/analysis/TranslationIndex.java b/src/cuchaz/enigma/analysis/TranslationIndex.java index 8651ebd..bd77344 100644 --- a/src/cuchaz/enigma/analysis/TranslationIndex.java +++ b/src/cuchaz/enigma/analysis/TranslationIndex.java | |||
| @@ -84,6 +84,10 @@ public class TranslationIndex implements Serializable { | |||
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | public void indexClass(CtClass c) { | 86 | public void indexClass(CtClass c) { |
| 87 | indexClass(c, true); | ||
| 88 | } | ||
| 89 | |||
| 90 | public void indexClass(CtClass c, boolean indexMembers) { | ||
| 87 | 91 | ||
| 88 | ClassEntry classEntry = EntryFactory.getClassEntry(c); | 92 | ClassEntry classEntry = EntryFactory.getClassEntry(c); |
| 89 | 93 | ||
| @@ -93,16 +97,18 @@ public class TranslationIndex implements Serializable { | |||
| 93 | m_superclasses.put(classEntry, superclassEntry); | 97 | m_superclasses.put(classEntry, superclassEntry); |
| 94 | } | 98 | } |
| 95 | 99 | ||
| 96 | // add fields | 100 | if (indexMembers) { |
| 97 | for (CtField field : c.getDeclaredFields()) { | 101 | // add fields |
| 98 | FieldEntry fieldEntry = EntryFactory.getFieldEntry(field); | 102 | for (CtField field : c.getDeclaredFields()) { |
| 99 | m_fieldEntries.put(fieldEntry.getClassEntry(), fieldEntry); | 103 | FieldEntry fieldEntry = EntryFactory.getFieldEntry(field); |
| 100 | } | 104 | m_fieldEntries.put(fieldEntry.getClassEntry(), fieldEntry); |
| 101 | 105 | } | |
| 102 | // add behaviors | 106 | |
| 103 | for (CtBehavior behavior : c.getDeclaredBehaviors()) { | 107 | // add behaviors |
| 104 | BehaviorEntry behaviorEntry = EntryFactory.getBehaviorEntry(behavior); | 108 | for (CtBehavior behavior : c.getDeclaredBehaviors()) { |
| 105 | m_behaviorEntries.put(behaviorEntry.getClassEntry(), behaviorEntry); | 109 | BehaviorEntry behaviorEntry = EntryFactory.getBehaviorEntry(behavior); |
| 110 | m_behaviorEntries.put(behaviorEntry.getClassEntry(), behaviorEntry); | ||
| 111 | } | ||
| 106 | } | 112 | } |
| 107 | } | 113 | } |
| 108 | 114 | ||