Example #1
0
        public static void Run(string[] args)
        {
            var kernel = new StandardKernel(new CommonModule(), new ConsoleModule());

            var options = new AutomatedScanningOptions();

            if (!CommandLine.Parser.Default.ParseArguments(args, options))
            {
                return;
            }
            var scanning = kernel.Get <AutomatedScanning>(new ConstructorArgument("options", options));

            scanning.Execute();
        }
Example #2
0
        public static void Run(string[] args)
        {
            // Initialize Ninject (the DI framework)
            var kernel = new StandardKernel(new CommonModule(), new ConsoleModule());

            Paths.ClearTemp();

            // Parse the command-line arguments (and display help text if appropriate)
            var options = new AutomatedScanningOptions();

            if (!CommandLine.Parser.Default.ParseArguments(args, options))
            {
                return;
            }

            // Start a pending worker process
            WorkerManager.Init();

            // Run the scan automation logic
            var scanning = kernel.Get <AutomatedScanning>(new ConstructorArgument("options", options));

            scanning.Execute().Wait();
        }