Esempio n. 1
0
        static int Main(string[] args)
        {
            Program.SetupConsole();

            if (args.Length == 0)
            {
                Console.WriteLine("Please input target file path!");
                return(1);
            }

            string target     = args[0];
            string outputPath = Path.GetDirectoryName(target);

            if (!File.Exists(target))
            {
                Console.WriteLine("Input file not exists!");
                return(1);
            }

            ObfuscationInfo info = new ObfuscationInfo(outputPath, true, true, true, true, true, false);

            Obfuscator obfuscator = new Obfuscator(info);

            obfuscator.AddAssembly(target, true);

            obfuscator.OnOutputEvent    += new DelOutputEvent(Program.RaiseOnOutputEvent);
            obfuscator.OnNameObfuscated += new DelNameObfuscated(Program.RaiseOnNameObfuscated);
            obfuscator.OnProgress       += new DelProgress(Program.RaiseOnProgress);

            obfuscator.StartObfuscation();

            return(0);
        }
Esempio n. 2
0
 public Obfuscator(ObfuscationInfo obfuscationInfo)
 {
     this.m_obfuscationInfo     = obfuscationInfo;
     this.m_obfuscationProgress = new ObfuscationProgress();
 }