Пример #1
0
 public bool Protect(ProtectorState state, string output_filename, Stream stream)
 {
     if (state == ProtectorState.During)
     {
         StripDOSHeader(stream);
         return(true);
     }
     return(false);
 }
Пример #2
0
 static void PerformProtections(ProtectorState state, string output_filename, Stream stream)
 {
     foreach (var protection in protections)
     {
         if (protection.enabled)
         {
             if (protection.Protect(state, output_filename, stream))
             {
                 Console.WriteLine(protection.init_message);
             }
             stream.Position = 0;
         }
     }
 }
Пример #3
0
        public bool Protect(ProtectorState state, string output_filename, Stream stream)
        {
            if (state == ProtectorState.During)
            {
                InjectAntiTamper(stream);
                return(true);
            }

            if (state == ProtectorState.Post)
            {
                InjectHash(output_filename);
                return(true);
            }

            return(false);
        }