本文整理汇总了Python中Detector.Detector.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Detector.__init__方法的具体用法?Python Detector.__init__怎么用?Python Detector.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Detector.Detector
的用法示例。
在下文中一共展示了Detector.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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
示例2: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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)
示例3: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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)
示例4: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
def __init__(self):
Detector.__init__(self)
self.STATE_COMPONENT_TRAIN = "COMPONENT_TRAIN"
self.tag = "keras-"
self.exampleBuilder = KerasExampleBuilder
self.matrices = None
self.arrays = None
示例5: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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
示例6: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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)
示例7: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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
示例8: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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)
示例9: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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)
示例10: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
def __init__(self):
Detector.__init__(self)
# Settings
self.STATE_TOOLCHAIN = "PROCESS"
self.steps = []
self.intermediateFilesAtSource = False
self.compressIntermediateFiles = False
self.intermediateFileTag = "temp"
示例11: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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-"
示例12: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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
示例13: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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)
示例14: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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 = ""
示例15: __init__
# 需要导入模块: from Detector import Detector [as 别名]
# 或者: from Detector.Detector import __init__ [as 别名]
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