Fix rename unique, renaming fields depends on classgraph for searching deep for fields
This commit is contained in:
@@ -62,6 +62,11 @@ public class Field
|
|||||||
{
|
{
|
||||||
return accessFlags;
|
return accessFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isStatic()
|
||||||
|
{
|
||||||
|
return (accessFlags & ACC_STATIC) != 0;
|
||||||
|
}
|
||||||
|
|
||||||
public String getName()
|
public String getName()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ public class GetField extends Instruction implements GetFieldInstruction
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
info.sigterm.deob.Field f2 = cf.findFieldDeep(nat);
|
info.sigterm.deob.Field f2 = cf.findFieldDeep(nat);
|
||||||
|
assert f2 != null;
|
||||||
|
|
||||||
if (f2 == f)
|
if (f2 == f)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ public class GetStatic extends Instruction implements GetFieldInstruction
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
info.sigterm.deob.Field f2 = cf.findFieldDeep(nat);
|
info.sigterm.deob.Field f2 = cf.findFieldDeep(nat);
|
||||||
|
assert f2 != null;
|
||||||
|
|
||||||
if (f2 == f)
|
if (f2 == f)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -163,6 +163,8 @@ public class RenameUnique implements Deobfuscator
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
int classes = 0, fields = 0, methods = 0;
|
int classes = 0, fields = 0, methods = 0;
|
||||||
|
|
||||||
|
group.buildClassGraph();
|
||||||
|
|
||||||
for (ClassFile cf : group.getClasses())
|
for (ClassFile cf : group.getClasses())
|
||||||
{
|
{
|
||||||
if (cf.getName().length() > 2)
|
if (cf.getName().length() > 2)
|
||||||
@@ -183,8 +185,6 @@ public class RenameUnique implements Deobfuscator
|
|||||||
++fields;
|
++fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
group.buildClassGraph();
|
|
||||||
|
|
||||||
// rename methods
|
// rename methods
|
||||||
for (ClassFile cf : group.getClasses())
|
for (ClassFile cf : group.getClasses())
|
||||||
for (Method method : cf.getMethods().getMethods())
|
for (Method method : cf.getMethods().getMethods())
|
||||||
|
|||||||
Reference in New Issue
Block a user