def __init__(self, conf, plugin, conn): self._conf = conf # config.cfg info self._plugin = plugin # plugins/X.cfg info self.rules = [] # list of RuleMatch objects self.conn = conn self.stop_processing = False Detector.__init__(self, conf, plugin, conn)
def __init__(self): Detector.__init__(self) self.STATE_COMPONENT_TRAIN = "COMPONENT_TRAIN" self.tag = "keras-" self.exampleBuilder = KerasExampleBuilder self.matrices = None self.arrays = None
def __init__(self, conf, plugin, conn): Detector.__init__(self, conf, plugin, conn) self.__conf = conf self.__plugin_id = plugin.get("DEFAULT", "plugin_id") self.__shutdown_event = threading.Event() self.__location = self._plugin.get("config", "location") self.__plugin_configuration = plugin
def __init__(self, conf, plugin, conn, idm=False): Detector.__init__(self, conf, plugin, conn) self._conf = conf self._plugin = plugin self.rules = [] # list of RuleMatch objects self.conn = conn self.__myDataBaseCursor = None self.__objDBConn = None self.__tries = 0 self.stop_processing = False self._databasetype = self._plugin.get("config", "source_type") self._canrun = True self.__idm = True if self._plugin.get("config", "idm") == "true" else False logger.info("IDM is %s for plugin %s" % ("enabled" if self.__idm else "disabled", self._plugin.get("DEFAULT", "plugin_id"))) if self._databasetype == "db2" and db2notloaded: logger.info( "You need python ibm_db module installed. This is not an error if you aren't using an IBM plugin" ) self._canrun = False elif self._databasetype == "mysql" and mysqlnotloaded: logger.info("You need python mysqldb module installed") self._canrun = False self.stop() elif self._databasetype == "oracle" and oraclenotloaded: logger.info( "You need python cx_Oracle module installed. This is not an error if you aren't using an Oracle plugin" ) self._canrun = False elif self._databasetype == "mssql" and mssqlnotloaded: logger.info("You need python pymssql module installed") self._canrun = False
def __init__(self, conf, plugin, idm=False): self._conf = conf self._plugin = plugin self.rules = [] # list of RuleMatch objects Detector.__init__(self, conf, plugin) self.__myDataBaseCursor = None self.__objDBConn = None self.__tries = 0 self.stop_processing = False self._databasetype = self._plugin.get("config", "source_type") self._canrun = True self.__idm = idm if self._databasetype == "db2" and db2notloaded: logger.info( "You need python ibm_db module installed. This is not an error if you aren't using an IBM plugin" ) self._canrun = False elif self._databasetype == "mysql" and mysqlnotloaded: logger.info("You need python mysqldb module installed") self._canrun = False self.stop() elif self._databasetype == "oracle" and oraclenotloaded: logger.info( "You need python cx_Oracle module installed. This is not an error if you aren't using an Oracle plugin" ) self._canrun = False elif self._databasetype == "mssql" and mssqlnotloaded: logger.info("You need python pymssql module installed") self._canrun = False
def __init__(self, conf, plugin, conn,idm=False): self._conf = conf self._plugin = plugin self.rules = [] # list of RuleMatch objects self.conn = conn Detector.__init__(self, conf, plugin, conn) self.__myDataBaseCursor = None self.__objDBConn = None self.__tries = 0 self.stop_processing = False self._databasetype = self._plugin.get("config", "source_type") self._canrun = True self.__idm = idm if self._databasetype == "db2" and db2notloaded: logger.info("You need python ibm_db module installed. This is not an error if you aren't using an IBM plugin") self._canrun = False elif self._databasetype == "mysql" and mysqlnotloaded: logger.info("You need python mysqldb module installed") self._canrun = False self.stop() elif self._databasetype == "oracle" and oraclenotloaded: logger.info("You need python cx_Oracle module installed. This is not an error if you aren't using an Oracle plugin") self._canrun = False elif self._databasetype == "mssql" and mssqlnotloaded: logger.info("You need python pymssql module installed") self._canrun = False
def __init__(self): Detector.__init__(self) self.state = self.init self.object_contour = None self.object_gripper_expanse = None self.object_center = None
def __init__(self, conf, plugin, hostname, username, password): self.__conf = conf self.__plugin = plugin self.__rules = [] # list of RuleMatch objects self.__hostname = hostname self.__username = username self.__password = password.strip() self.__section = self.__plugin.get("config", "section") self.__last_record_time = "" if self.__section == "": #search into the command to find the section rules = self.__plugin.rules() cmd_str = rules['cmd']['cmd'] for sec in ParserWMI.VALID_SECTIONS: if cmd_str.find(sec) >= 0: self.__section = sec logger.warning( "section doesn't found in [config].Section deduced: %s " % self.__section) break if self.__section == "": self.__section = "Security" logger.warning( "section doesn't found in [config].It can't be deduced: Setting it to default value: %s" % self.__section) self.__pluginID = self.__plugin.get("DEFAULT", "plugin_id") self.__stop_processing = False self.__sectionExists = False Detector.__init__(self, conf, plugin)
def __init__(self, conf, plugin, conn,idm=False): Detector.__init__(self, conf, plugin, conn) self._conf = conf self._plugin = plugin self.rules = [] # list of RuleMatch objects self.conn = conn self.__myDataBaseCursor = None self.__objDBConn = None self.__tries = 0 self.stop_processing = False self._databasetype = self._plugin.get("config", "source_type") self._canrun = True self.__idm = True if self._plugin.get("config", "idm") == "true" else False self.loginfo(Lazyformat("IDM is {}", "enabled" if self.__idm else "disabled")) if self._databasetype == "db2" and db2notloaded: self.loginfo("You need python ibm_db module installed") self._canrun = False elif self._databasetype == "mysql" and mysqlnotloaded: self.loginfo("You need python mysqldb module installed") self._canrun = False self.stop() elif self._databasetype == "oracle" and oraclenotloaded: self.loginfo("You need python cx_Oracle module installed") self._canrun = False elif self._databasetype == "mssql" and mssqlnotloaded: self.loginfo("You need python pymssql module installed") self._canrun = False
def __init__(self, conf, plugin, conn, hostname, username, password): self.__conf = conf self.__plugin = plugin self.__rules = [] # list of RuleMatch objects self.__conn = conn self.__hostname = hostname self.__username = username self.__password = password.strip() self.__section = self.__plugin.get("config", "section") self.__last_record_time = "" if self.__section == "": #search into the command to find the section rules = self.__plugin.rules() cmd_str = rules['cmd']['cmd'] for sec in ParserWMI.VALID_SECTIONS: if cmd_str.find(sec)>=0: self.__section = sec logger.warning("section doesn't found in [config].Section deduced: %s " % self.__section) break if self.__section == "": self.__section = "Security" logger.warning("section doesn't found in [config].It can't be deduced: Setting it to default value: %s" % self.__section) self.__pluginID = self.__plugin.get("DEFAULT", "plugin_id") self.__stop_processing = False self.__sectionExists = False Detector.__init__(self, conf, plugin, conn)
def __init__(self, conf, plugin, conn): self._conf = conf self._plugin = plugin self.rules = [] self.conn = conn self.sIdFile = '/etc/ossim/agent/sdee_sid.data' Detector.__init__(self, conf, plugin, conn)
def __init__(self, conf, plugin, conn, idm=False): Detector.__init__(self, conf, plugin, conn) self._conf = conf self._plugin = plugin self.rules = [] # list of RuleMatch objects self.conn = conn self.__myDataBaseCursor = None self.__objDBConn = None self.__tries = 0 self.stop_processing = False self._databasetype = self._plugin.get("config", "source_type") self._canrun = True self.__idm = True if self._plugin.get("config", "idm") == "true" else False self.loginfo( Lazyformat("IDM is {}", "enabled" if self.__idm else "disabled")) if self._databasetype == "db2" and db2notloaded: self.loginfo("You need python ibm_db module installed") self._canrun = False elif self._databasetype == "mysql" and mysqlnotloaded: self.loginfo("You need python mysqldb module installed") self._canrun = False self.stop() elif self._databasetype == "oracle" and oraclenotloaded: self.loginfo("You need python cx_Oracle module installed") self._canrun = False elif self._databasetype == "mssql" and mssqlnotloaded: self.loginfo("You need python pymssql module installed") self._canrun = False
def __init__(self): Detector.__init__(self) # Settings self.STATE_TOOLCHAIN = "PROCESS" self.steps = [] self.intermediateFilesAtSource = False self.compressIntermediateFiles = False self.intermediateFileTag = "temp"
def __init__(self, conf, plugin,queue = None): self._conf = conf # config.cfg info self._plugin = plugin # plugins/X.cfg info self.rules = [] # list of RuleMatch objects self.stop_processing = False self.queue = queue self.idmConnected = False Detector.__init__(self, conf, plugin)
def __init__(self, conf, plugin, conn): self._conf = conf # main agent config file self._plugin = plugin # plugin config file self.conn = conn self._prefix = "" Detector.__init__(self, conf, plugin, self.conn)
def __init__(self, conf, plugin, queue=None): self._conf = conf # config.cfg info self._plugin = plugin # plugins/X.cfg info self.rules = [] # list of RuleMatch objects self.stop_processing = False self.queue = queue self.idmConnected = False Detector.__init__(self, conf, plugin)
def __init__(self, conf, plugin, conn, hostname, username, password): self._conf = conf self._plugin = plugin self.rules = [] # list of RuleMatch objects self.conn = conn self.hostname = hostname self.username = username self.password = password Detector.__init__(self, conf, plugin, conn)
def __init__(self): Detector.__init__(self) # Settings self.STATE_TOOLCHAIN = "PROCESS" self.steps = [] for step in self.getDefaultSteps(): self.addStep(*step) self.intermediateFilesAtSource = False self.compressIntermediateFiles = True self.intermediateFileTag = "temp" self.modelParameterStringName = None
def __init__(self): Detector.__init__(self) self.triggerDetector = EntityDetector() self.edgeDetector = EdgeDetector() self.unmergingDetector = UnmergingDetector() self.doUnmergingSelfTraining = True #False self.modifierDetector = ModifierDetector() #self.stEvaluator = Evaluators.BioNLP11GeniaTools #self.stWriteScores = False self.STATE_COMPONENT_TRAIN = "COMPONENT_TRAIN" self.tag = "event-"
def __init__(self): Detector.__init__(self) self.state = self.init self.object_contour = None self.object_gripper_expanse = None self.object_center = None self.object_rotation = None self.pub_position_midpoint = rospy.Publisher( "/object_recognition/position_midpoint", Vector3, queue_size=10) self.pub_orientation = rospy.Publisher( "/object_recognition/orientation", Vector3, queue_size=10)
def __init__(self, conf, plugin, hostname=None, username=None, password=None): self._conf = conf self._plugin = plugin self.rules = [] self.sIdFile = '/etc/ossim/agent/sdee_sid.data' self.__hostname = hostname self.__username = username self.__password = password if hostname: self.sIdFile = '/etc/ossim/agent/sdee_sid_%s.data' % hostname else: self.sIdFile = '/etc/ossim/agent/sdee_sid.data' Detector.__init__(self, conf, plugin)
def __init__(self, conf, plugin, conn, hostname=None, username=None, password=None): self._conf = conf self._plugin = plugin self.rules = [] self.conn = conn self.__hostname = hostname self.__username = username self.__password = password if hostname: self.sIdFile = '/etc/ossim/agent/sdee_sid_%s.data' % hostname else: self.sIdFile = '/etc/ossim/agent/sdee_sid.data' Detector.__init__(self, conf, plugin, conn)
def __init__(self, conf, plugin, conn): self._conf = conf # config.cfg info self._plugin = plugin # plugins/X.cfg info self.rules = [] # list of ElasticRules objects self.conn = conn self.stop_processing = False self.sleep_time = 10 Detector.__init__(self, conf, plugin, conn) # Initialize values with config self._plugin_config() self._parse_rules() self.loginfo(Lazyformat("Init ParserElastic"))
def __init__(self, conf, plugin): self._conf = conf # config.cfg info self._plugin = plugin # plugins/X.cfg info self.rules = [] # list of RuleMatch objects Detector.__init__(self, conf, plugin) self.__tailLock = Lock() self.stop_processing = False self.__locations = [] self.__watchdog = pyinotify.WatchManager() self.__notifier = None#pyinotify.ThreadedNotifier(self.__watchdog, FileEventHandler()) self.__startNotifier = False self.__tails = [] self.__monitorLocations = [] self.__bookmark_dir = ""
def __init__(self, conf, plugin): self._conf = conf # config.cfg info self._plugin = plugin # plugins/X.cfg info self.rules = [] # list of RuleMatch objects Detector.__init__(self, conf, plugin) self.__tailLock = Lock() self.stop_processing = False self.__locations = [] self.__watchdog = pyinotify.WatchManager() self.__notifier = None #pyinotify.ThreadedNotifier(self.__watchdog, FileEventHandler()) self.__startNotifier = False self.__tails = [] self.__monitorLocations = [] self.__bookmark_dir = ""
def __init__(self): Detector.__init__(self) self.state = self.recognize_objects self.objects = self.object_manager.load_objects() rospy.Subscriber("/royale_camera_driver/point_cloud", PointCloud2, self.save_point_cloud) self.point_cloud = None self.pub_position = rospy.Publisher("/object_recognition/point", PointStamped, queue_size=10) self.pub_object = rospy.Publisher( "/object_recognition/recognized_object", RecognizedObject, queue_size=10)
def __init__(self, config, plugin_config): ''' config: Agent configuration object plugin_config: Plugin configuration ''' Detector.__init__(self, config, plugin_config, None) self.__keepWorking = False self.__pluginConfig = plugin_config self.__keep_working_v_lock = threading.RLock() self.__logDirectory = "" self.__filePrefix = "" self.__currentOpenedLogFile_fd = None self.__currentOpenedLogFile_name = "" self.__currentOpenedLogFile_size = 0 self.__timestamp = 0 self.__logfiles = [] self.__skipOldEvents = True
def __init__(self, steps=None): Detector.__init__(self) # Settings self.STATE_TOOLCHAIN = "PROCESS" self.group = None self.definedSteps = [] self.definedStepDict = {} self.defineSteps() self.steps = self.getSteps(steps) #self.allSteps = {} #self.allStepsList = [] #self.groups = [] #self.presets = {} #for step in self.getDefaultSteps(): # self.addStep(*step) self.intermediateFilesAtSource = False self.compressIntermediateFiles = True self.intermediateFileTag = "temp" self.modelParameterStringName = None
def __init__(self, hosts, user=None, password=None, timeout_sec=3, translator=None): Detector.__init__(self, hosts, user=user, password=password, timeout_sec=timeout_sec, translator=translator) self.__lock = Lock()
def __init__(self): Detector.__init__(self) self.deleteCombinedExamples = True