mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-13 05:58:33 +00:00
Added #1690 Deobfuscation tool dialog for script level (not just current method / all classes)
Changed #1690 Redesigned Deobfuscation tool dialog. Removed "Restore control flow" deobfuscation level as it was the same as "Remove traps"
This commit is contained in:
@@ -3761,8 +3761,6 @@ public final class SWF implements SWFContainerItem, Timelined, Openable {
|
||||
tag.getABC().removeDeadCode(deoListener);
|
||||
} else if (level == DeobfuscationLevel.LEVEL_REMOVE_TRAPS) {
|
||||
tag.getABC().removeTraps(deoListener);
|
||||
} else if (level == DeobfuscationLevel.LEVEL_RESTORE_CONTROL_FLOW) {
|
||||
tag.getABC().removeTraps(deoListener);
|
||||
}
|
||||
|
||||
((Tag) tag).setModified(true);
|
||||
|
||||
@@ -23,9 +23,7 @@ package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
|
||||
public enum DeobfuscationLevel {
|
||||
|
||||
LEVEL_REMOVE_DEAD_CODE(1),
|
||||
LEVEL_REMOVE_TRAPS(2),
|
||||
LEVEL_RESTORE_CONTROL_FLOW(3);
|
||||
|
||||
LEVEL_REMOVE_TRAPS(2);
|
||||
private final int level;
|
||||
|
||||
public int getLevel() {
|
||||
@@ -37,9 +35,7 @@ public enum DeobfuscationLevel {
|
||||
case 1:
|
||||
return LEVEL_REMOVE_DEAD_CODE;
|
||||
case 2:
|
||||
return LEVEL_REMOVE_TRAPS;
|
||||
case 3:
|
||||
return LEVEL_RESTORE_CONTROL_FLOW;
|
||||
return LEVEL_REMOVE_TRAPS;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2022 JPEXS, All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3.0 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library.
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public enum DeobfuscationScope {
|
||||
METHOD,
|
||||
CLASS,
|
||||
SWF
|
||||
}
|
||||
@@ -192,8 +192,6 @@ public final class MethodBody implements Cloneable {
|
||||
removeDeadCode(abc.constants, trait, abc.method_info.get(method_info));
|
||||
} else if (level == DeobfuscationLevel.LEVEL_REMOVE_TRAPS) {
|
||||
removeTraps(abc, trait, scriptIndex, classIndex, isStatic, path);
|
||||
} else if (level == DeobfuscationLevel.LEVEL_RESTORE_CONTROL_FLOW) {
|
||||
removeTraps(abc, trait, scriptIndex, classIndex, isStatic, path);
|
||||
}
|
||||
|
||||
((Tag) abc.parentTag).setModified(true);
|
||||
|
||||
Reference in New Issue
Block a user