mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-28 17:50:45 +00:00
Merge origin/master
This commit is contained in:
+3
-26
@@ -17,9 +17,6 @@
|
||||
package com.jpexs.decompiler.flash.action.deobfuscation;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.flash.abc.types.MethodBody;
|
||||
import com.jpexs.decompiler.flash.abc.types.traits.Trait;
|
||||
import com.jpexs.decompiler.flash.action.Action;
|
||||
import com.jpexs.decompiler.flash.action.ActionList;
|
||||
import com.jpexs.decompiler.flash.action.ActionListReader;
|
||||
@@ -78,7 +75,8 @@ import com.jpexs.decompiler.flash.action.swf5.ActionTypeOf;
|
||||
import com.jpexs.decompiler.flash.action.swf6.ActionGreater;
|
||||
import com.jpexs.decompiler.flash.action.swf6.ActionStringGreater;
|
||||
import com.jpexs.decompiler.flash.ecma.EcmaScript;
|
||||
import com.jpexs.decompiler.flash.helpers.SWFDecompilerListener;
|
||||
import com.jpexs.decompiler.flash.helpers.SWFDecompilerAdapter;
|
||||
import com.jpexs.decompiler.flash.helpers.collections.FixItemCounterStack;
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
import com.jpexs.decompiler.graph.model.FalseItem;
|
||||
import com.jpexs.decompiler.graph.model.PushItem;
|
||||
@@ -95,7 +93,7 @@ import java.util.Stack;
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class ActionDeobfuscator implements SWFDecompilerListener {
|
||||
public class ActionDeobfuscator extends SWFDecompilerAdapter {
|
||||
|
||||
private final int executionLimit = 5000;
|
||||
|
||||
@@ -665,27 +663,6 @@ public class ActionDeobfuscator implements SWFDecompilerListener {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] proxyFileCatched(byte[] data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void swfParsed(SWF swf) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void abcParsed(ABC abc, SWF swf) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void methodBodyParsed(MethodBody body, SWF swf) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void avm2CodeRemoveTraps(String path, int classIndex, boolean isStatic, int scriptIndex, ABC abc, Trait trait, int methodInfo, MethodBody body) throws InterruptedException {
|
||||
}
|
||||
|
||||
class ExecutionResult {
|
||||
|
||||
public ActionItem item;
|
||||
|
||||
-67
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2015 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.action.deobfuscation;
|
||||
|
||||
import java.util.Stack;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
*/
|
||||
public class FixItemCounterStack extends Stack<Object> {
|
||||
|
||||
private int fixItemCount = Integer.MAX_VALUE;
|
||||
|
||||
public FixItemCounterStack() {
|
||||
}
|
||||
|
||||
public Object peek(int index) {
|
||||
return super.get(size() - index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object pop() {
|
||||
Object result = super.pop();
|
||||
int itemCount = size();
|
||||
if (itemCount < fixItemCount) {
|
||||
fixItemCount = itemCount;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object remove(int index) {
|
||||
if (index < fixItemCount) {
|
||||
fixItemCount = index;
|
||||
}
|
||||
return super.remove(index);
|
||||
}
|
||||
|
||||
public boolean allItemsFixed() {
|
||||
return size() <= fixItemCount;
|
||||
}
|
||||
|
||||
public int getFixItemCount() {
|
||||
return fixItemCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
fixItemCount = Integer.MAX_VALUE;
|
||||
super.clear();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user