public Scanner(Responder r) { _responder = r; stop_on_find = (ConfigurationManager.AppSettings["action_on_find"] == "stop"); }
public static void Main(string[] args) { try { HandleExceptions(); Application.EnableVisualStyles(); // set up the log handler log = new LogHandler(); // set up the redis connectino //redis = new Redis(); // get the mode of operation mode = GetMode(args); // init responder responder = new Responder(); // init findings helper findings = new FindingHelper(); // init api helper //api = new Api(); // init dashboard helper //dashboard = new Dashboard(); //dashboard.Register(); //dashboard.Fetch(); // send the heartbeat //dashboard.Heartbeat(); // init echo listener //echo = new EchoHelper(); //echo.init(); foreach (string arg in args) { Console.WriteLine("arg {0}", arg); if (arg.ToLower().Contains("clean")) { should_clean = true; } if (arg.ToLower().Contains("no-reboot")) { should_reboot = false; } } //Console.WriteLine("Press Enter to Start Scanning"); //Console.ReadLine(); Scan(); Application.Exit(); //Route(); } catch (Exception e) { Program.log.Write("Unhandled Exception. " + e.Message); Program.log.Write(e.StackTrace); } }