clean up codes
parent
b9061c567c
commit
cad7fff2d1
|
@ -2,11 +2,7 @@
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using UnityEditor.VersionControl;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.Conf
|
namespace Obfuz.Conf
|
||||||
|
@ -17,7 +13,7 @@ namespace Obfuz.Conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public interface IMethodRule<R> where R: IRule<R>
|
public interface IMethodRule<R> where R : IRule<R>
|
||||||
{
|
{
|
||||||
string Name { get; set; }
|
string Name { get; set; }
|
||||||
NameMatcher NameMatcher { get; set; }
|
NameMatcher NameMatcher { get; set; }
|
||||||
|
@ -33,7 +29,7 @@ namespace Obfuz.Conf
|
||||||
public R Rule { get; set; }
|
public R Rule { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ITypeRule<T, R> where T: IMethodRule<R> where R : IRule<R>
|
public interface ITypeRule<T, R> where T : IMethodRule<R> where R : IRule<R>
|
||||||
{
|
{
|
||||||
string Name { get; set; }
|
string Name { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,7 @@
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using UnityEditor.VersionControl;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Obfuz.Conf
|
namespace Obfuz.Conf
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,9 +3,6 @@ using Obfuz.ObfusPasses;
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
@ -189,7 +186,7 @@ namespace Obfuz
|
||||||
ObfuscationPassType passType = ObfuscationPassType.None;
|
ObfuscationPassType passType = ObfuscationPassType.None;
|
||||||
foreach (var passName in obfuscationPassTypesStr.Split('|'))
|
foreach (var passName in obfuscationPassTypesStr.Split('|'))
|
||||||
{
|
{
|
||||||
if (Enum.TryParse< ObfuscationPassType>(passName, out var pass))
|
if (Enum.TryParse<ObfuscationPassType>(passName, out var pass))
|
||||||
{
|
{
|
||||||
passType |= pass;
|
passType |= pass;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
using System;
|
namespace Obfuz.Editor
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Editor
|
|
||||||
{
|
{
|
||||||
public static class ConstValues
|
public static class ConstValues
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,11 +6,6 @@ using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Net.NetworkInformation;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.Assertions;
|
using UnityEngine.Assertions;
|
||||||
|
|
||||||
namespace Obfuz.Data
|
namespace Obfuz.Data
|
||||||
|
|
|
@ -4,9 +4,7 @@ using Obfuz.Emit;
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine.Assertions;
|
using UnityEngine.Assertions;
|
||||||
|
|
||||||
namespace Obfuz.Data
|
namespace Obfuz.Data
|
||||||
|
|
|
@ -3,9 +3,6 @@ using dnlib.DotNet.Emit;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.Remoting.Messaging;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Emit
|
namespace Obfuz.Emit
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Emit
|
namespace Obfuz.Emit
|
||||||
{
|
{
|
||||||
|
@ -45,7 +42,7 @@ namespace Obfuz.Emit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<T> GetEntities<T>() where T: IGroupByModuleEntity
|
public List<T> GetEntities<T>() where T : IGroupByModuleEntity
|
||||||
{
|
{
|
||||||
var managers = new List<T>();
|
var managers = new List<T>();
|
||||||
foreach (var kv in _moduleEntityManagers)
|
foreach (var kv in _moduleEntityManagers)
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.EncryptionVM.Instructions
|
namespace Obfuz.EncryptionVM.Instructions
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.EncryptionVM.Instructions
|
namespace Obfuz.EncryptionVM.Instructions
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.EncryptionVM.Instructions
|
namespace Obfuz.EncryptionVM.Instructions
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.EncryptionVM.Instructions
|
namespace Obfuz.EncryptionVM.Instructions
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.EncryptionVM.Instructions
|
namespace Obfuz.EncryptionVM.Instructions
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.EncryptionVM.Instructions
|
namespace Obfuz.EncryptionVM.Instructions
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.EncryptionVM.Instructions
|
namespace Obfuz.EncryptionVM.Instructions
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.EncryptionVM
|
namespace Obfuz.EncryptionVM
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
using NUnit.Framework;
|
using Obfuz.EncryptionVM.Instructions;
|
||||||
using Obfuz.EncryptionVM.Instructions;
|
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine.Assertions;
|
|
||||||
using UnityEngine.UIElements;
|
|
||||||
|
|
||||||
namespace Obfuz.EncryptionVM
|
namespace Obfuz.EncryptionVM
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq.Expressions;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.Assertions;
|
using UnityEngine.Assertions;
|
||||||
using UnityEngine.UIElements;
|
|
||||||
|
|
||||||
namespace Obfuz.EncryptionVM
|
namespace Obfuz.EncryptionVM
|
||||||
{
|
{
|
||||||
|
@ -47,7 +41,7 @@ namespace Obfuz.EncryptionVM
|
||||||
byte[] strBytes = Encrypt("abcdef", ops, salt);
|
byte[] strBytes = Encrypt("abcdef", ops, salt);
|
||||||
Assert.AreEqual("abcdef", DecryptString(strBytes, 0, strBytes.Length, ops, salt));
|
Assert.AreEqual("abcdef", DecryptString(strBytes, 0, strBytes.Length, ops, salt));
|
||||||
var arr = new byte[100];
|
var arr = new byte[100];
|
||||||
for (int i = 0; i < arr.Length ; i++)
|
for (int i = 0; i < arr.Length; i++)
|
||||||
{
|
{
|
||||||
arr[i] = (byte)i;
|
arr[i] = (byte)i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
using Obfuz.ObfusPasses;
|
using Obfuz.ObfusPasses;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet.Emit;
|
||||||
|
using Obfuz.Emit;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Obfuz.Emit;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses
|
namespace Obfuz.ObfusPasses
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,15 +1,9 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using Obfuz.Utils;
|
|
||||||
using Obfuz.Emit;
|
using Obfuz.Emit;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine.Assertions;
|
|
||||||
using Obfuz.Settings;
|
using Obfuz.Settings;
|
||||||
|
using Obfuz.Utils;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.CallObfus
|
namespace Obfuz.ObfusPasses.CallObfus
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,8 +7,6 @@ using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using MethodImplAttributes = dnlib.DotNet.MethodImplAttributes;
|
using MethodImplAttributes = dnlib.DotNet.MethodImplAttributes;
|
||||||
using TypeAttributes = dnlib.DotNet.TypeAttributes;
|
using TypeAttributes = dnlib.DotNet.TypeAttributes;
|
||||||
|
|
||||||
|
@ -211,7 +209,7 @@ namespace Obfuz.ObfusPasses.CallObfus
|
||||||
salt = salt,
|
salt = salt,
|
||||||
encryptedIndex = encryptedIndex,
|
encryptedIndex = encryptedIndex,
|
||||||
};
|
};
|
||||||
methodDispatcher.methods.Add(new CallInfo { method = method, callVir = callVir});
|
methodDispatcher.methods.Add(new CallInfo { method = method, callVir = callVir });
|
||||||
_methodProxys.Add(key, proxyInfo);
|
_methodProxys.Add(key, proxyInfo);
|
||||||
}
|
}
|
||||||
return new ProxyCallMethodData(proxyInfo.proxyMethod, proxyInfo.encryptedOps, proxyInfo.salt, proxyInfo.encryptedIndex, proxyInfo.index);
|
return new ProxyCallMethodData(proxyInfo.proxyMethod, proxyInfo.encryptedOps, proxyInfo.salt, proxyInfo.encryptedIndex, proxyInfo.index);
|
||||||
|
|
|
@ -3,11 +3,7 @@ using Obfuz.Conf;
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.CallObfus
|
namespace Obfuz.ObfusPasses.CallObfus
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet.Emit;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Obfuz.Utils;
|
|
||||||
using Obfuz.Emit;
|
|
||||||
using Obfuz.Data;
|
using Obfuz.Data;
|
||||||
using UnityEngine;
|
using Obfuz.Emit;
|
||||||
using Obfuz.Settings;
|
using Obfuz.Settings;
|
||||||
|
using Obfuz.Utils;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.CallObfus
|
namespace Obfuz.ObfusPasses.CallObfus
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.CallObfus
|
namespace Obfuz.ObfusPasses.CallObfus
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet.Emit;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.CallObfus
|
namespace Obfuz.ObfusPasses.CallObfus
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,5 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.CleanUp
|
namespace Obfuz.ObfusPasses.CleanUp
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
|
||||||
using Obfuz.Editor;
|
using Obfuz.Editor;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.CleanUp
|
namespace Obfuz.ObfusPasses.CleanUp
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,10 +4,7 @@ using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.ConstEncrypt
|
namespace Obfuz.ObfusPasses.ConstEncrypt
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,15 +2,7 @@
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using Obfuz.Emit;
|
using Obfuz.Emit;
|
||||||
using Obfuz.Settings;
|
using Obfuz.Settings;
|
||||||
using Obfuz.Utils;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.Assertions;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.ConstEncrypt
|
namespace Obfuz.ObfusPasses.ConstEncrypt
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using Obfuz.Emit;
|
|
||||||
using Obfuz.Data;
|
|
||||||
using Obfuz.Utils;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using System.Text;
|
using Obfuz.Data;
|
||||||
|
using Obfuz.Emit;
|
||||||
using Obfuz.Settings;
|
using Obfuz.Settings;
|
||||||
using UnityEngine.Assertions.Must;
|
using Obfuz.Utils;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.ConstEncrypt
|
namespace Obfuz.ObfusPasses.ConstEncrypt
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.ConstEncrypt
|
namespace Obfuz.ObfusPasses.ConstEncrypt
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.ConstEncrypt
|
namespace Obfuz.ObfusPasses.ConstEncrypt
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.ExprObfus
|
namespace Obfuz.ObfusPasses.ExprObfus
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using Obfuz.Conf;
|
using Obfuz.Conf;
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,6 @@ using Obfuz.Settings;
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using UnityEngine.Assertions;
|
using UnityEngine.Assertions;
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.FieldEncrypt
|
namespace Obfuz.ObfusPasses.FieldEncrypt
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using Obfuz;
|
|
||||||
using Obfuz.Settings;
|
using Obfuz.Settings;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.FieldEncrypt
|
namespace Obfuz.ObfusPasses.FieldEncrypt
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.FieldEncrypt
|
namespace Obfuz.ObfusPasses.FieldEncrypt
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet.Emit;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.FieldEncrypt
|
namespace Obfuz.ObfusPasses.FieldEncrypt
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
using dnlib.DotNet.Emit;
|
using dnlib.DotNet;
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet.Emit;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
using Obfuz.Emit;
|
namespace Obfuz.ObfusPasses
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses
|
|
||||||
{
|
{
|
||||||
public abstract class ObfuscationPassBase : IObfuscationPass
|
public abstract class ObfuscationPassBase : IObfuscationPass
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using dnlib.DotNet;
|
using System.Text;
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus.NameMakers
|
namespace Obfuz.ObfusPasses.SymbolObfus.NameMakers
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine.Assertions;
|
using UnityEngine.Assertions;
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus.NameMakers
|
namespace Obfuz.ObfusPasses.SymbolObfus.NameMakers
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.Remoting.Messaging;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus.NameMakers
|
namespace Obfuz.ObfusPasses.SymbolObfus.NameMakers
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using Microsoft.SqlServer.Server;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus.NameMakers
|
namespace Obfuz.ObfusPasses.SymbolObfus.NameMakers
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using dnlib.DotNet;
|
using System.Collections.Generic;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus.NameMakers
|
namespace Obfuz.ObfusPasses.SymbolObfus.NameMakers
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using Obfuz.Conf;
|
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Linq;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
namespace Obfuz.ObfusPasses.SymbolObfus.Policies
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,10 +5,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
|
||||||
using System.Text;
|
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using System.Xml.Linq;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus
|
namespace Obfuz.ObfusPasses.SymbolObfus
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
using Obfuz.Settings;
|
using Obfuz.Settings;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus
|
namespace Obfuz.ObfusPasses.SymbolObfus
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using Obfuz.ObfusPasses.SymbolObfus;
|
|
||||||
using Obfuz.ObfusPasses.SymbolObfus.NameMakers;
|
using Obfuz.ObfusPasses.SymbolObfus.NameMakers;
|
||||||
using Obfuz.ObfusPasses.SymbolObfus.Policies;
|
using Obfuz.ObfusPasses.SymbolObfus.Policies;
|
||||||
using Obfuz.Settings;
|
using Obfuz.Settings;
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data.OleDb;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using UnityEditor.SceneManagement;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Assertions;
|
using UnityEngine.Assertions;
|
||||||
|
|
||||||
|
@ -142,7 +137,7 @@ namespace Obfuz.ObfusPasses.SymbolObfus
|
||||||
}
|
}
|
||||||
foreach (EventDef eventDef in type.Events)
|
foreach (EventDef eventDef in type.Events)
|
||||||
{
|
{
|
||||||
CollectCArgumentWithTypeOf (eventDef, customAttributes);
|
CollectCArgumentWithTypeOf(eventDef, customAttributes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -577,7 +572,7 @@ namespace Obfuz.ObfusPasses.SymbolObfus
|
||||||
{
|
{
|
||||||
newVirtualMethodName = existVirtualMethodName;
|
newVirtualMethodName = existVirtualMethodName;
|
||||||
}
|
}
|
||||||
else if(newVirtualMethodName != existVirtualMethodName)
|
else if (newVirtualMethodName != existVirtualMethodName)
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"Virtual method rename conflict. {m} => {existVirtualMethodName} != {newVirtualMethodName}");
|
Debug.LogWarning($"Virtual method rename conflict. {m} => {existVirtualMethodName} != {newVirtualMethodName}");
|
||||||
conflict = true;
|
conflict = true;
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.ObfusPasses.SymbolObfus
|
namespace Obfuz.ObfusPasses.SymbolObfus
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using Obfuz.Editor;
|
using Obfuz.Editor;
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
|
|
|
@ -1,14 +1,8 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using Obfuz.Data;
|
using Obfuz.Data;
|
||||||
using Obfuz.Emit;
|
using Obfuz.Emit;
|
||||||
using Obfuz.ObfusPasses;
|
|
||||||
using Obfuz.ObfusPasses.SymbolObfus;
|
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
using Obfuz.Data;
|
using Obfuz.Data;
|
||||||
using Obfuz.Emit;
|
using Obfuz.Emit;
|
||||||
using Obfuz.EncryptionVM;
|
using Obfuz.EncryptionVM;
|
||||||
using Obfuz.ObfusPasses;
|
|
||||||
using Obfuz.ObfusPasses.CleanUp;
|
using Obfuz.ObfusPasses.CleanUp;
|
||||||
using Obfuz.ObfusPasses.SymbolObfus;
|
using Obfuz.ObfusPasses.SymbolObfus;
|
||||||
using Obfuz.Unity;
|
using Obfuz.Unity;
|
||||||
|
@ -11,10 +10,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using IAssemblyResolver = Obfuz.Utils.IAssemblyResolver;
|
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
{
|
{
|
||||||
|
@ -141,7 +137,7 @@ namespace Obfuz
|
||||||
throw new Exception($"class Obfuz.EncryptionVM.GeneratedEncryptionVirtualMachine found in multiple assemblies! Please retain only one!");
|
throw new Exception($"class Obfuz.EncryptionVM.GeneratedEncryptionVirtualMachine found in multiple assemblies! Please retain only one!");
|
||||||
}
|
}
|
||||||
|
|
||||||
var gvmInstance = (IEncryptor)Activator.CreateInstance(generatedVmTypes[0], new object[] { secretKey } );
|
var gvmInstance = (IEncryptor)Activator.CreateInstance(generatedVmTypes[0], new object[] { secretKey });
|
||||||
|
|
||||||
VerifyVm(vm, vms, gvmInstance);
|
VerifyVm(vm, vms, gvmInstance);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using Obfuz.ObfusPasses;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
using NUnit.Framework;
|
|
||||||
using Obfuz.Editor;
|
using Obfuz.Editor;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.Settings
|
namespace Obfuz.Settings
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.Settings
|
namespace Obfuz.Settings
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.Settings
|
namespace Obfuz.Settings
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.Settings
|
namespace Obfuz.Settings
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.Settings
|
namespace Obfuz.Settings
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.Remoting.Messaging;
|
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEditorInternal;
|
using UnityEditorInternal;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
|
||||||
using System.Reflection;
|
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEditor.Presets;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.UIElements;
|
using UnityEngine.UIElements;
|
||||||
|
|
||||||
namespace Obfuz.Settings
|
namespace Obfuz.Settings
|
||||||
|
@ -74,7 +70,7 @@ namespace Obfuz.Settings
|
||||||
|
|
||||||
public override void OnGUI(string searchContext)
|
public override void OnGUI(string searchContext)
|
||||||
{
|
{
|
||||||
if (_serializedObject == null||!_serializedObject.targetObject)
|
if (_serializedObject == null || !_serializedObject.targetObject)
|
||||||
{
|
{
|
||||||
InitGUI();
|
InitGUI();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.Settings
|
namespace Obfuz.Settings
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
using Obfuz.ObfusPasses.SymbolObfus;
|
using Obfuz.Utils;
|
||||||
using Obfuz.Utils;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.Settings
|
namespace Obfuz.Settings
|
||||||
|
|
|
@ -1,18 +1,15 @@
|
||||||
using Obfuz.Settings;
|
using Obfuz.Settings;
|
||||||
using Obfuz.Utils;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEditor.Build;
|
using UnityEditor.Build;
|
||||||
using UnityEditor.Build.Reporting;
|
using UnityEditor.Build.Reporting;
|
||||||
using UnityEditor.UnityLinker;
|
using UnityEditor.UnityLinker;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static UnityEngine.GraphicsBuffer;
|
|
||||||
using FileUtil = Obfuz.Utils.FileUtil;
|
using FileUtil = Obfuz.Utils.FileUtil;
|
||||||
|
|
||||||
namespace Obfuz.Unity
|
namespace Obfuz.Unity
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
using System;
|
using dnlib.DotNet;
|
||||||
|
using Obfuz.Settings;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEditor.Build;
|
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
using UnityEditor.Build;
|
||||||
using UnityEditor.Build.Reporting;
|
using UnityEditor.Build.Reporting;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEditor.Compilation;
|
|
||||||
using Obfuz.Utils;
|
|
||||||
using FileUtil = Obfuz.Utils.FileUtil;
|
using FileUtil = Obfuz.Utils.FileUtil;
|
||||||
using Obfuz.Settings;
|
|
||||||
using dnlib.DotNet;
|
|
||||||
|
|
||||||
namespace Obfuz.Unity
|
namespace Obfuz.Unity
|
||||||
{
|
{
|
||||||
|
@ -145,4 +141,4 @@ namespace Obfuz.Unity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
using Obfuz.Utils;
|
using Obfuz.Utils;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
using System;
|
namespace Obfuz.Utils
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
|
||||||
{
|
{
|
||||||
public abstract class AssemblyResolverBase : IAssemblyResolver
|
public abstract class AssemblyResolverBase : IAssemblyResolver
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
using System;
|
using System.Collections.Generic;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Configuration.Assemblies;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System;
|
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine.UIElements;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
using System;
|
namespace Obfuz.Utils
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
|
||||||
{
|
{
|
||||||
public interface IAssemblyResolver
|
public interface IAssemblyResolver
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
using NUnit.Framework;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,11 +4,8 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine.Assertions;
|
using UnityEngine.Assertions;
|
||||||
using UnityEngine.UIElements;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using Obfuz.Editor;
|
using Obfuz.Editor;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.ConstrainedExecution;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
using System;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
@ -19,7 +13,7 @@ namespace Obfuz.Utils
|
||||||
|
|
||||||
public override string ResolveAssembly(string assemblyName)
|
public override string ResolveAssembly(string assemblyName)
|
||||||
{
|
{
|
||||||
foreach(var path in _searchPaths)
|
foreach (var path in _searchPaths)
|
||||||
{
|
{
|
||||||
string assPath = Path.Combine(path, assemblyName + ".dll");
|
string assPath = Path.Combine(path, assemblyName + ".dll");
|
||||||
if (File.Exists(assPath))
|
if (File.Exists(assPath))
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
using System;
|
using UnityEditor;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using UnityEditor;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,4 @@
|
||||||
using Obfuz.Emit;
|
namespace Obfuz.Utils
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
|
||||||
{
|
{
|
||||||
public class RandomWithKey : IRandom
|
public class RandomWithKey : IRandom
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
using dnlib.DotNet;
|
using dnlib.DotNet;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz.Utils
|
namespace Obfuz.Utils
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Unity.Collections.LowLevel.Unsafe;
|
|
||||||
using UnityEngine;
|
|
||||||
using UnityEngine.Assertions;
|
using UnityEngine.Assertions;
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public struct DefaultStaticEncryptionScope: IEncryptionScope
|
public struct DefaultStaticEncryptionScope : IEncryptionScope
|
||||||
{
|
{
|
||||||
public void ForcePreserveAOT()
|
public void ForcePreserveAOT()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
using System;
|
namespace Obfuz
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz
|
|
||||||
{
|
{
|
||||||
|
|
||||||
public static class EncryptionService<T> where T : IEncryptionScope
|
public static class EncryptionService<T> where T : IEncryptionScope
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
using JetBrains.Annotations;
|
using System;
|
||||||
using System;
|
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Unity.Collections.LowLevel.Unsafe;
|
using Unity.Collections.LowLevel.Unsafe;
|
||||||
using UnityEngine.Assertions;
|
using UnityEngine.Assertions;
|
||||||
|
@ -249,7 +247,7 @@ namespace Obfuz
|
||||||
|
|
||||||
public virtual unsafe void DecryptBlock(byte[] data, int ops, int salt)
|
public virtual unsafe void DecryptBlock(byte[] data, int ops, int salt)
|
||||||
{
|
{
|
||||||
fixed(byte* dataPtr = &data[0])
|
fixed (byte* dataPtr = &data[0])
|
||||||
{
|
{
|
||||||
DecryptBlock(dataPtr, data.Length, ops, salt);
|
DecryptBlock(dataPtr, data.Length, ops, salt);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System.Collections.Generic;
|
namespace Obfuz
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz
|
|
||||||
{
|
{
|
||||||
public interface IEncryptor
|
public interface IEncryptor
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Obfuz
|
namespace Obfuz
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue