project: update from 184 to 184 (#1675)

* 184

* checkstyle

* project: fix exports.
This commit is contained in:
Ganom
2019-09-28 13:37:36 -04:00
committed by Kyle
parent 63e7952335
commit cb57ab26b3
341 changed files with 90585 additions and 90740 deletions

View File

@@ -64,7 +64,7 @@ public class Deob
{
private static final Logger logger = LoggerFactory.getLogger(Deob.class);
public static final int OBFUSCATED_NAME_MAX_LEN = 2;
public static final int OBFUSCATED_NAME_MAX_LEN = 3;
private static final boolean CHECK_EXEC = false;
public static void main(String[] args) throws IOException
@@ -152,7 +152,15 @@ public class Deob
public static boolean isObfuscated(String name)
{
return name.length() <= OBFUSCATED_NAME_MAX_LEN || name.startsWith("method") || name.startsWith("vmethod") || name.startsWith("field") || name.startsWith("class") || name.startsWith("__");
if (name.length() <= OBFUSCATED_NAME_MAX_LEN)
{
return !name.equals("run") && !name.equals("add");
}
return name.startsWith("method")
|| name.startsWith("vmethod")
|| name.startsWith("field")
|| name.startsWith("class")
|| name.startsWith("__");
}
private static void runMath(ClassGroup group)

View File

@@ -48,7 +48,9 @@ public class RenameUnique implements Deobfuscator
for (ClassFile cf : group.getClasses())
{
if (cf.getName().length() > Deob.OBFUSCATED_NAME_MAX_LEN)
{
continue;
}
map.map(cf.getPoolClass(), "class" + i++);
}
@@ -61,8 +63,10 @@ public class RenameUnique implements Deobfuscator
for (ClassFile cf : group.getClasses())
for (Field field : cf.getFields())
{
if (field.getName().length() > Deob.OBFUSCATED_NAME_MAX_LEN && !field.getName().startsWith("__") || field.getName().equals(DeobAnnotations.getExportedName(field.getAnnotations())))
if (!Deob.isObfuscated(field.getName()) || field.getName().equals(DeobAnnotations.getExportedName(field.getAnnotations())))
{
continue;
}
map.map(field.getPoolField(), "field" + i++);
}
@@ -75,8 +79,10 @@ public class RenameUnique implements Deobfuscator
for (ClassFile cf : group.getClasses())
for (Method method : cf.getMethods())
{
if (method.getName().length() > Deob.OBFUSCATED_NAME_MAX_LEN && !method.getName().startsWith("__") || method.getName().equals(DeobAnnotations.getExportedName(method.getAnnotations())))
if (!Deob.isObfuscated(method.getName()) || method.getName().equals(DeobAnnotations.getExportedName(method.getAnnotations())))
{
continue;
}
List<Method> virtualMethods = VirtualMethods.getVirtualMethods(method);
assert !virtualMethods.isEmpty();

View File

@@ -112,7 +112,9 @@ public class RenameUniqueTest
InvokeInstruction ii = (InvokeInstruction) i;
Assert.assertTrue(ii.getMethod().getName().length() > Deob.OBFUSCATED_NAME_MAX_LEN
|| ii.getMethod().getClazz().getName().length() > Deob.OBFUSCATED_NAME_MAX_LEN);
|| ii.getMethod().getClazz().getName().length() > Deob.OBFUSCATED_NAME_MAX_LEN
|| ii.getMethod().getName().equals("run")
|| ii.getMethod().getName().equals("add"));
}
}
}