示例#1
0
 def setup(self):
     super().setup()
     self.stats_updater = StatisticDbUpdater(config=self.config)
     self.stats_updater.update_statistic(
         'file_type', {
             'file_types': [['application/gzip', 3454]],
             'firmware_container': [['application/zip', 3],
                                    ['firmware/foo', 1]]
         })
     self.stats_updater.update_statistic(
         'known_vulnerabilities',
         {'known_vulnerabilities': [['BackDoor_String', 1]]})
示例#2
0
 def __init__(self, config=None):
     self._config = config
     self.db = StatisticDbUpdater(config=self._config)
     self.start_time = None
     self.match = {}
示例#3
0
 def __init__(self, config, component):
     self.config = config
     self.component = component
     self.db = StatisticDbUpdater(config=self.config)
     self.platform_information = self._get_platform_information()
     logging.debug('{}: Online'.format(self.component))