def Start(self, Options): self.PluginHandler = plugin_handler.PluginHandler(self, Options) self.Config.ProcessOptions(Options) self.PluginParams = plugin_params.PluginParams(self, Options) self.Timer = timer.Timer(self.Config.Get('DATE_TIME_FORMAT')) if Options['ListPlugins']: self.PluginHandler.ShowPluginList() return False # No processing required, just list available modules self.DB = db.DB( self ) # DB is initialised from some Config settings, must be hooked at this point self.DB.Init() Command = self.GetCommand(Options['argv']) self.DB.Run.StartRun(Command) # Log owtf run options, start time, etc if self.Config.Get('SIMULATION'): cprint( "WARNING: In Simulation mode plugins are not executed only plugin sequence is simulated" ) self.Requester = requester.Requester(self, Options['Proxy']) # Proxy Check ProxySuccess, Message = self.Requester.ProxyCheck() cprint(Message) if not ProxySuccess: # Regardless of interactivity settings if the proxy check fails = no point to move on self.Error.FrameworkAbort(Message) # Abort if proxy check failed # Each Plugin adds its own results to the report, the report is updated on the fly after each plugin completes (or before!) self.Error.SetCommand(self.AnonymiseCommand( Command)) # Set anonymised invoking command for error dump info Status = self.PluginHandler.ProcessPlugins() if Status['AllSkipped']: self.Finish('Complete: Nothing to do') elif not Status['SomeSuccessful'] and Status['SomeAborted']: self.Finish('Aborted') return False elif not Status[ 'SomeSuccessful']: # Not a single plugin completed successfully, major crash or something self.Finish('Crashed') return False return True # Scan was successful
def initialise_plugin_handler_and_params(self, Options): self.PluginHandler = plugin_handler.PluginHandler(self, Options) self.PluginParams = plugin_params.PluginParams(self, Options)
def initialise_plugin_handler_and_params(self, options): # The order is important here ;) self.PluginHandler = plugin_handler.PluginHandler(self, options) self.PluginParams = plugin_params.PluginParams(self, options) self.WorkerManager = worker_manager.WorkerManager(self)