예제 #1
0
        public static int Main(string[] args)
        {
            ArgumentsChecker checker = new ArgumentsChecker(args);

            if (!checker.Run())
            {
                WriteLine(checker.Error);

                return(-1);
            }

            using (ConversionManager manager = new ConversionManager(new FileHandler(), new RegistryHandler(), new Dpapi()))
                WriteLine(manager.Run(checker.Action, checker.Key, checker.FilePath));

            return(0);
        }
예제 #2
0
파일: Program.cs 프로젝트: binglot/Bin2Reg
        static void Main(string[] args)
        {
            var argumentsChecker = new ArgumentsChecker(args);

            if (!argumentsChecker.Run()) {
                Console.WriteLine(argumentsChecker.Error);
                return;
            }

            var action = argumentsChecker.Action;
            var registryKey = argumentsChecker.Key;
            var filePath = argumentsChecker.FilePath;

            var fileHandler = new FileHandler();
            var registryHandler = new RegistryHandler();
            //var encoder = new XorEncoder();
            var encoder = new Dpapi();

            var conversion = new ConversionManager(fileHandler, registryHandler, encoder);
            conversion.Run(action, registryKey, filePath);

            Console.WriteLine(conversion.Result);
        }