本文整理汇总了Python中Detector.Detector类的典型用法代码示例。如果您正苦于以下问题:Python Detector类的具体用法?Python Detector怎么用?Python Detector使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Detector类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
Detector.__init__(self)
self.STATE_COMPONENT_TRAIN = "COMPONENT_TRAIN"
self.tag = "keras-"
self.exampleBuilder = KerasExampleBuilder
self.matrices = None
self.arrays = None
示例2: __init__
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__
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
示例4: __init__
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
示例5: __init__
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)
示例6: __init__
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
示例7: __init__
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)
示例8: __init__
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)
示例9: __init__
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)
示例10: __init__
def __init__(self):
Detector.__init__(self)
# Settings
self.STATE_TOOLCHAIN = "PROCESS"
self.steps = []
self.intermediateFilesAtSource = False
self.compressIntermediateFiles = False
self.intermediateFileTag = "temp"
示例11: process
def process(self,root):
se = StructureExtractor()
se.drawFeature(root)
self.extractor = Extractor(root)
self.extractor.process()
#self.crossP = self.extractor.string2sparse(self.htmlnode.attrib['crossP'],self.extractor.totalheight+1)
Config.init()
detector = Detector()#Config.nbTLstr)
detector.detect(root)
self.toolbox.setDetector(detector)
示例12: performAnalyse
def performAnalyse(self, htmlnode):
se = StructureExtractor()
se.drawFeature(htmlnode)
extractor = Extractor(htmlnode)
extractor.process()
detector = Detector()
detector.detect(htmlnode)
(tp, fp, fn) = self.calcAccTitleLine(htmlnode)
cerr = self.calcAccColumn(htmlnode)
return (tp, fp, fn, cerr)
示例13: __init__
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
示例14: __init__
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-"
示例15: __init__
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)