Пример #1
0
        public static void Main(string[] args)
        {
            string file = "";
            string patched = "";

            foreach( string str in args)
            {
                if(str.Contains("--host="))
                    file = str.Split('=')[1];
                if(str == "--help" || str == "-h" )
                {
                    help();
                    return;
                }
                if(str.Contains("--patched="))
                    patched = str.Split('=')[1];
            }
            System.IO.FileInfo fileInfo = new System.IO.FileInfo(file);
            if(!fileInfo.Exists)
            {
                Console.WriteLine("File {0} not found",file);
                return;
            }
            if(patched == "")
            {
                patched = file;
                Console.WriteLine("Name of new Patched assembly file is not given. Will take host file name \"{0}\"",file);
            }
            AssemblyInjector injector = new AssemblyInjector(file,patched,typeof(void));

            return;
        }
Пример #2
0
        public static void Main(string[] args)
        {
            string file    = "";
            string patched = "";

            foreach (string str in args)
            {
                if (str.Contains("--host="))
                {
                    file = str.Split('=')[1];
                }
                if (str == "--help" || str == "-h")
                {
                    help();
                    return;
                }
                if (str.Contains("--patched="))
                {
                    patched = str.Split('=')[1];
                }
            }
            System.IO.FileInfo fileInfo = new System.IO.FileInfo(file);
            if (!fileInfo.Exists)
            {
                Console.WriteLine("File {0} not found", file);
                return;
            }
            if (patched == "")
            {
                patched = file;
                Console.WriteLine("Name of new Patched assembly file is not given. Will take host file name \"{0}\"", file);
            }
            AssemblyInjector injector = new AssemblyInjector(file, patched, typeof(void));

            return;
        }