849
This commit is contained in:
@@ -221,7 +221,6 @@ public class Rename2
|
|||||||
System.out.println(etwo.getGraph());
|
System.out.println(etwo.getGraph());
|
||||||
|
|
||||||
for (int i = 0; i < 250; ++i)
|
for (int i = 0; i < 250; ++i)
|
||||||
//for (int i = 0; i < Math.min(one.getClasses().size(), two.getClasses().size()); ++i)
|
|
||||||
{
|
{
|
||||||
ClassFile c1 = one.findClass("class" + i);
|
ClassFile c1 = one.findClass("class" + i);
|
||||||
ClassFile c2 = two.findClass("class" + i);
|
ClassFile c2 = two.findClass("class" + i);
|
||||||
@@ -240,9 +239,9 @@ public class Rename2
|
|||||||
ClassFile cf1 = one.findClass("client"), cf2 = two.findClass("client");
|
ClassFile cf1 = one.findClass("client"), cf2 = two.findClass("client");
|
||||||
mapDeobfuscatedMethods(cf1, cf2);
|
mapDeobfuscatedMethods(cf1, cf2);
|
||||||
|
|
||||||
//List<Field> fl1 = getClientFields(one, eone);
|
// List<Field> fl1 = getClientFields(one, eone);
|
||||||
//List<Field> fl2 = getClientFields(two, etwo);
|
// List<Field> fl2 = getClientFields(two, etwo);
|
||||||
|
//
|
||||||
// for (int i = 0; i < Math.min(fl1.size(), fl2.size()); ++i)
|
// for (int i = 0; i < Math.min(fl1.size(), fl2.size()); ++i)
|
||||||
// {
|
// {
|
||||||
// Field f1 = fl1.get(i), f2 = fl2.get(i);
|
// Field f1 = fl1.get(i), f2 = fl2.get(i);
|
||||||
@@ -315,7 +314,7 @@ public class Rename2
|
|||||||
//
|
//
|
||||||
// show(mappings);
|
// show(mappings);
|
||||||
|
|
||||||
System.out.println("Solved methods "+ g1.solved(VertexType.METHOD) + ", total " + g1.getVerticies().size());
|
System.out.println("Solved methods "+ g1.solved(VertexType.METHOD) + ", solved fields " + g1.solved(VertexType.FIELD) + ", total " + g1.getVerticies().size());
|
||||||
|
|
||||||
//rename(mappings, two);
|
//rename(mappings, two);
|
||||||
|
|
||||||
|
|||||||
@@ -4,5 +4,7 @@ public enum EdgeType
|
|||||||
{
|
{
|
||||||
INVOKE,
|
INVOKE,
|
||||||
GETFIELD,
|
GETFIELD,
|
||||||
SETFIELD;
|
SETFIELD,
|
||||||
|
|
||||||
|
INVOKED_FROM;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,10 +187,13 @@ public class Vertex
|
|||||||
assert is == null;
|
assert is == null;
|
||||||
assert other.graph != graph;
|
assert other.graph != graph;
|
||||||
|
|
||||||
Method thism = (Method) object;
|
if (object instanceof Method)
|
||||||
Method otherm = (Method) other.object;
|
{
|
||||||
|
Method thism = (Method) object;
|
||||||
|
Method otherm = (Method) other.object;
|
||||||
|
|
||||||
assert thism.getMethods().getClassFile().getName().equals(otherm.getMethods().getClassFile().getName());
|
assert thism.getMethods().getClassFile().getName().equals(otherm.getMethods().getClassFile().getName());
|
||||||
|
}
|
||||||
|
|
||||||
this.is = other;
|
this.is = other;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,7 +208,10 @@ public class Execution
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (Method m : methods)
|
for (Method m : methods)
|
||||||
|
{
|
||||||
graph.addEdge(frame.nonStatic, m, EdgeType.INVOKE);
|
graph.addEdge(frame.nonStatic, m, EdgeType.INVOKE);
|
||||||
|
graph.addEdge(m, frame.nonStatic, EdgeType.INVOKED_FROM);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (i instanceof FieldInstruction)
|
else if (i instanceof FieldInstruction)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user