Unused params is not working

This commit is contained in:
Adam
2015-10-18 20:34:20 -04:00
parent 9678bff181
commit 75364815aa
4 changed files with 36 additions and 26 deletions

View File

@@ -39,36 +39,36 @@ public class Deob
ClassGroup group = loadJar(args[0]);
run(group, new RenameUnique());
// remove except RuntimeException
run(group, new RuntimeExceptions());
// remove unused methods
run(group, new UnusedMethods());
run(group, new UnreachedCode());
// remove illegal state exceptions, frees up some parameters
run(group, new IllegalStateExceptions());
// remove constant logically dead parameters
run(group, new ConstantParameter());
// remove unhit blocks
run(group, new UnreachedCode());
// // remove unused parameters
// run(group, new UnusedParameters());
// run(group, new RenameUnique());
//
// // remove except RuntimeException
// run(group, new RuntimeExceptions());
//
// // remove jump obfuscation
// //new Jumps().run(group);
// // remove unused methods
// run(group, new UnusedMethods());
//
// run(group, new UnreachedCode());
//
// // remove illegal state exceptions, frees up some parameters
// run(group, new IllegalStateExceptions());
//
// // remove constant logically dead parameters
// run(group, new ConstantParameter());
//
// // remove unhit blocks
// run(group, new UnreachedCode());
// remove unused parameters
run(group, new UnusedParameters());
// remove jump obfuscation
//new Jumps().run(group);
// remove unused fields
run(group, new UnusedFields());
//run(group, new UnusedFields());
// remove unused methods, again?
run(group, new UnusedMethods());
//run(group, new UnusedMethods());
//
// run(group, new MethodInliner());
//

View File

@@ -260,6 +260,8 @@ public class UnusedParameters implements Deobfuscator
int[] i;
do
{
group.buildClassGraph();
Execution execution = new Execution(group);
execution.populateInitialMethods();
execution.run();

View File

@@ -169,7 +169,10 @@ public class Frame
while (stack.getSize() > 0)
{
StackContext stacki = stack.pop();
System.err.println(stacki);
InstructionContext pushed = stacki.getPushed();
Frame frame = pushed.getFrame();
System.err.println(pushed.getInstruction().getDesc(frame));
}
System.err.println("end of stack");
ex.printStackTrace();

View File

@@ -59,6 +59,11 @@ public class InstructionContext
{
return ins;
}
public Frame getFrame()
{
return frame;
}
public Stack getStack()
{