【混淆】还原失败修改

main
刘涛 2025-10-27 12:04:06 +08:00
parent 38d2af5fd8
commit 833f726f62
6 changed files with 1 additions and 102 deletions

View File

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 2a26998a42d391f488611789fae6ad28
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,79 +0,0 @@
using System;
using Obfuz.Utils;
using UnityEditor;
using UnityEngine;
namespace Obfuz.ObfusPasses.SymbolObfus.Policies
{
public partial class MyCustomRenamePolicy : ObfuscationPolicyBase
{
[MenuItem("Test/ObfuzExt/CustomIgnore Test")]
public static void Test()
{
var typeName = typeof(MyCustomRenamePolicy).FullName;
Debug.Log($"fullName: {typeName}");
if (ReflectionUtil.FindUniqueTypeInCurrentAppDomain(typeName) is Type type)
{
Debug.Log($"Type found: {type.FullName}");
// 检查基类
Debug.Log($"Base type: {type.BaseType?.FullName}");
// 检查实现的接口
var interfaces = type.GetInterfaces();
Debug.Log($"Interfaces count: {interfaces.Length}");
foreach (var iface in interfaces)
{
Debug.Log($" - {iface.FullName}");
}
// 尝试创建实例
var instance = Activator.CreateInstance(type);
Debug.Log($"Instance created: {instance != null}");
Debug.Log($"Instance type: {instance?.GetType().FullName}");
// 检查是否是 IObfuscationPolicy
if (instance is IObfuscationPolicy policy)
{
Debug.Log("✓ Is IObfuscationPolicy");
}
else
{
Debug.LogWarning("✗ Not IObfuscationPolicy");
Debug.Log($"Looking for: {typeof(IObfuscationPolicy).FullName}");
}
}
else
{
Debug.LogError($"Type not found: {typeName}");
}
}
public override bool NeedRename(dnlib.DotNet.TypeDef typeDef)
{
return false;
}
public override bool NeedRename(dnlib.DotNet.MethodDef methodDef)
{
return false;
}
public override bool NeedRename(dnlib.DotNet.FieldDef fieldDef)
{
return false;
}
public override bool NeedRename(dnlib.DotNet.PropertyDef propertyDef)
{
return false;
}
public override bool NeedRename(dnlib.DotNet.EventDef eventDef)
{
return false;
}
}
}

View File

@ -1,3 +0,0 @@
fileFormatVersion: 2
guid: f56c0bd11ba7453ab3ea5b45bccc3a9f
timeCreated: 1761301239

View File

@ -1,3 +0,0 @@
{
"reference": "GUID:66e09fc524ec6594b8d6ca1d91aa1a41"
}

View File

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 5f2feb3db52c12749aa7d55f08a38c4b
AssemblyDefinitionReferenceImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -52,8 +52,7 @@ MonoBehaviour:
debugSymbolMappingFile: Assets/Obfuz/SymbolObfus/symbol-mapping-debug.xml
ruleFiles:
- Assets/Obfuz/symbol-obfuscation.xml
customRenamePolicyTypes:
- Obfuz.ObfusPasses.SymbolObfus.Policies.MyCustomRenamePolicy
customRenamePolicyTypes: []
constEncryptSettings:
encryptionLevel: 1
ruleFiles: []