G
Gelöschtes Mitglied 144
Guest
Lieber MasterOf13FPS Member!
In diesem Thread möchte ich mit dir eine "simple" Anti ILDasm Protection teilen.
In diesem Thread möchte ich mit dir eine "simple" Anti ILDasm Protection teilen.
C#:
using dnlib.DotNet;
namespace vektus.Protection.Analysis
{
class AntiILDasmProtection
{
Public Void ProtectionPhase(Context ctx)
{
var ManifestModule = ctx.ManifestModule;
//Create Ref
TypeRef supressref = ManifestModule.CorLibTypes.GetTypeRef("System.Runtime.CompilerServices", "SuppressIldasmAttribute");
var ctorRef = new MemberRefUser(ManifestModule, ".ctor", MethodSig.CreateInstance(ManifestModule.CorLibTypes.Void), supressref);
var supressattribute = new CustomAttribute(ctorRef);
//add Attribute
ManifestModule.CustomAttributes.Add(supressattribute);
}
}
}
mfg, vektus!