一些小重构
parent
3238405c83
commit
87dd8a39c1
|
@ -10,6 +10,15 @@ namespace Obfuz
|
|||
{
|
||||
public class CleanUpInstructionPass : ObfuscationPassBase
|
||||
{
|
||||
public override void Start(ObfuscatorContext ctx)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Stop(ObfuscatorContext ctx)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void Process(ObfuscatorContext ctx)
|
||||
{
|
||||
foreach (var ass in ctx.assemblies)
|
||||
|
@ -30,14 +39,5 @@ namespace Obfuz
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Start(ObfuscatorContext ctx)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Stop(ObfuscatorContext ctx)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ namespace Obfuz.Emit
|
|||
{
|
||||
throw new System.Exception($"No functions available for type {type}");
|
||||
}
|
||||
if (options.depth >= 4)
|
||||
if (options.depth >= 2)
|
||||
{
|
||||
//return new ConstDataNode() { Type = type, Value = value };
|
||||
return _random.NextInt(100) < 50 ?
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace Obfuz.MemEncrypt
|
|||
}
|
||||
default: return false;
|
||||
}
|
||||
Debug.Log($"memory encrypt field: {field}");
|
||||
//Debug.Log($"memory encrypt field: {field}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,8 +51,8 @@ namespace Obfuz
|
|||
|
||||
_pipeline.AddPass(new MemoryEncryptionPass());
|
||||
//_pipeline.AddPass(new ProxyCallPass());
|
||||
//_pipeline.AddPass(new ExprObfuscationPass());
|
||||
//_pipeline.AddPass(new DataVirtualizationPass());
|
||||
_pipeline.AddPass(new ExprObfuscationPass());
|
||||
_pipeline.AddPass(new DataVirtualizationPass());
|
||||
_pipeline.AddPass(new RenameSymbolPass());
|
||||
_pipeline.AddPass(new CleanUpInstructionPass());
|
||||
|
||||
|
@ -105,7 +105,7 @@ namespace Obfuz
|
|||
string refAssName = refAss.Name.ToString();
|
||||
if (assByName.TryGetValue(refAssName, out var refAssembly))
|
||||
{
|
||||
UnityEngine.Debug.Log($"assembly:{ass.name} reference to {refAssName}");
|
||||
//UnityEngine.Debug.Log($"assembly:{ass.name} reference to {refAssName}");
|
||||
refAssembly.referenceMeAssemblies.Add(ass);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue