Exemplo n.º 1
0
		/// <inheritdoc />
		public void Mark(IDnlibDef member, ConfuserComponent parentComp) {
			if (member == null)
				throw new ArgumentNullException("member");
			if (member is ModuleDef)
				throw new ArgumentException("New ModuleDef cannot be marked.");
			if (IsMarked(member)) // avoid double marking
				return;

			marker.MarkMember(member, context);
			if (parentComp != null)
				helperParents[member] = parentComp;
		}
Exemplo n.º 2
0
 public void MarkHelper(IDnlibDef def, IMarkerService marker, ConfuserComponent parentComp)
 {
     if (marker.IsMarked(def))
     {
         return;
     }
     if (def is MethodDef)
     {
         var method = (MethodDef)def;
         method.Access = MethodAttributes.Assembly;
         if (!method.IsSpecialName && !method.IsRuntimeSpecialName && !method.DeclaringType.IsDelegate())
         {
             method.Name = RandomName();
         }
     }
     else if (def is FieldDef)
     {
         var field = (FieldDef)def;
         field.Access = FieldAttributes.Assembly;
         if (!field.IsSpecialName && !field.IsRuntimeSpecialName)
         {
             field.Name = RandomName();
         }
     }
     else if (def is TypeDef)
     {
         var type = (TypeDef)def;
         type.Visibility = type.DeclaringType == null ? TypeAttributes.NotPublic : TypeAttributes.NestedAssembly;
         type.Namespace  = "";
         if (!type.IsSpecialName && !type.IsRuntimeSpecialName)
         {
             type.Name = RandomName();
         }
     }
     SetCanRename(def, false);
     Analyze(def);
     marker.Mark(def, parentComp);
 }
Exemplo n.º 3
0
        /// <inheritdoc />
        public void Mark(IDnlibDef member, ConfuserComponent parentComp)
        {
            if (member == null)
            {
                throw new ArgumentNullException("member");
            }

            if (member is ModuleDef)
            {
                throw new ArgumentException("New ModuleDef cannot be marked.");
            }

            if (IsMarked(member)) // avoid double marking
            {
                return;
            }

            marker.MarkMember(member, context);
            if (parentComp != null)
            {
                helperParents[member] = parentComp;
            }
        }
Exemplo n.º 4
0
 public InjectPhase(ConfuserComponent parent) : base(parent)
 {
 }
Exemplo n.º 5
0
 public MemoryEditApplyPhase(ConfuserComponent parent) : base(parent)
 {
 }
Exemplo n.º 6
0
 public AntiWatermarkPhase(ConfuserComponent parent) : base(parent)
 {
 }
Exemplo n.º 7
0
 public VirtualizatonPhase(ConfuserComponent parent) : base(parent)
 {
 }
 public MemoryEditAnalyzePhase(ConfuserComponent parent) : base(parent)
 {
 }
 public FakeObfuscatorTypesPhase(ConfuserComponent parent) : base(parent)
 {
 }
Exemplo n.º 10
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ProtectionPhase" /> class.
 /// </summary>
 /// <param name="parent">The parent component of this phase.</param>
 public ProtectionPhase(ConfuserComponent parent)
 {
     Parent = parent;
 }
Exemplo n.º 11
0
 public HashPhase(ConfuserComponent parent) : base(parent)
 {
 }
 public FakeObfuscatorAttributesPhase(ConfuserComponent parent) : base(parent)
 {
 }
 public MemoryEditInjectPhase(ConfuserComponent parent) : base(parent)
 {
 }