mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 23:50:45 +00:00
Changed AS1/2 deobfuscation - removing obfuscated declarations is now optional (default: off)
This commit is contained in:
+4
-4
@@ -117,9 +117,10 @@ public class ActionDeobfuscator extends SWFDecompilerAdapter {
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
//Commented out, as it may remove variables used in another DoAction or inside functions.
|
||||
//changed = removeObfuscatedUnusedVariables(fastActions);
|
||||
//actions.setActions(fastActions.toActionList());
|
||||
if (Configuration.deobfuscateAs12RemoveInvalidNamesAssignments.get()) {
|
||||
changed = removeObfuscatedUnusedVariables(fastActions);
|
||||
actions.setActions(fastActions.toActionList());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +322,6 @@ public class ActionDeobfuscator extends SWFDecompilerAdapter {
|
||||
return ret;
|
||||
}
|
||||
|
||||
//currently unused
|
||||
private boolean removeObfuscatedUnusedVariables(FastActionList actions) throws InterruptedException {
|
||||
if (actions.isEmpty()) {
|
||||
return false;
|
||||
|
||||
@@ -835,6 +835,10 @@ public final class Configuration {
|
||||
@ConfigurationCategory("display")
|
||||
public static ConfigurationItem<Boolean> autoPlaySounds = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("script")
|
||||
public static ConfigurationItem<Boolean> deobfuscateAs12RemoveInvalidNamesAssignments = null;
|
||||
|
||||
private enum OSId {
|
||||
WINDOWS, OSX, UNIX
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user