diff --git a/Editor/CleanUpInstructionPass.cs b/Editor/CleanUpInstructionPass.cs index af95f9f..7f7dda7 100644 --- a/Editor/CleanUpInstructionPass.cs +++ b/Editor/CleanUpInstructionPass.cs @@ -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) - { - - } } } diff --git a/Editor/Emit/RandomDataNodeCreator.cs b/Editor/Emit/RandomDataNodeCreator.cs index 1aaa791..2ed55f7 100644 --- a/Editor/Emit/RandomDataNodeCreator.cs +++ b/Editor/Emit/RandomDataNodeCreator.cs @@ -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 ? diff --git a/Editor/MemEncrypt/MemoryEncryptionPass.cs b/Editor/MemEncrypt/MemoryEncryptionPass.cs index 164948e..be15fd2 100644 --- a/Editor/MemEncrypt/MemoryEncryptionPass.cs +++ b/Editor/MemEncrypt/MemoryEncryptionPass.cs @@ -92,7 +92,7 @@ namespace Obfuz.MemEncrypt } default: return false; } - Debug.Log($"memory encrypt field: {field}"); + //Debug.Log($"memory encrypt field: {field}"); return true; } } diff --git a/Editor/Obfuscator.cs b/Editor/Obfuscator.cs index 17b0a0d..26ed048 100644 --- a/Editor/Obfuscator.cs +++ b/Editor/Obfuscator.cs @@ -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); } }