Exemplo n.º 1
0
 def __init__(self, CoreObj, Options):
     self.Core = CoreObj
     #This should be dynamic from filesystem:
     #self.PluginGroups = [ 'web', 'net', 'aux' ]
     #self.PluginTypes = [ 'passive', 'semi_passive', 'active', 'grep' ]
     #self.AllowedPluginTypes = self.GetAllowedPluginTypes(Options['PluginType'].split(','))
     #self.Simulation, self.Scope, self.PluginGroup, self.Algorithm, self.ListPlugins = [ Options['Simulation'], Options['Scope'], Options['PluginGroup'], Options['Algorithm'], Options['ListPlugins'] ]
     self.Simulation, self.Scope, self.PluginGroup, self.ListPlugins = [
         Options['Simulation'], Options['Scope'], Options['PluginGroup'],
         Options['ListPlugins']
     ]
     self.OnlyPluginsList = self.ValidateAndFormatPluginList(
         Options['OnlyPlugins'])
     self.ExceptPluginsList = self.ValidateAndFormatPluginList(
         Options['ExceptPlugins'])
     #print "OnlyPlugins="+str(self.OnlyPluginsList)
     #print "ExceptPlugins="+str(self.ExceptPluginsList)
     #print "Options['PluginType']="+str(Options['PluginType'])
     if isinstance(
             Options['PluginType'], str
     ):  # For special plugin types like "quiet" -> "semi_passive" + "passive"
         Options['PluginType'] = Options['PluginType'].split(',')
     self.AllowedPlugins = self.Core.DB.Plugin.GetPluginsByGroupType(
         self.PluginGroup, Options['PluginType'])
     self.OnlyPluginsSet = len(self.OnlyPluginsList) > 0
     self.ExceptPluginsSet = len(self.ExceptPluginsList) > 0
     self.scanner = Scanner(self.Core)
     self.InitExecutionRegistry()
     self.showOutput = True
Exemplo n.º 2
0
 def init(self, options):
     self.init_options(options)
     self.Core = self.get_component("core")
     self.plugin_output = self.get_component("plugin_output")
     self.reporter = self.get_component("reporter")
     self.scanner = Scanner()
Exemplo n.º 3
0
 def before(self):
     self._create_core_mock()
     self.scanner = Scanner(self.core_mock)