Beispiel #1
0
 def investigate(self, original_front_input, forced_log_type=None):
     clues = defaultdict(itertools.chain)
     for host, path, super_parser in self._log_type.files_to_parse(forced_log_type):
         if host == "localhost":
             searcher = BacktrackSearcher(path, self._investigation_step, super_parser)
             InvestigationUtils.merge_clue_dicts(clues, searcher.search(original_front_input))
         else:
             raise NotImplementedError("Cannot operate on %s which is different than %s" % (host, "localhost"))
     return clues
Beispiel #2
0
 def investigate(self, original_front_input, forced_log_type=None):
     clues = defaultdict(itertools.chain)
     for host, path, super_parser in self._log_type.files_to_parse(forced_log_type):
         if host == "localhost":
             searcher = BacktrackSearcher(path, self._investigation_step, super_parser)
             InvestigationUtils.merge_clue_dicts(clues, searcher.search(original_front_input))
         else:
             raise NotImplementedError(
                 "Cannot operate on %s which is different than %s" % (host, "localhost")
             )
     return clues
Beispiel #3
0
 def investigate(self, original_front_input, tmp_assign_to_log_type=EMPTY_FROZEN_DICT):
     """
     this function collects clues from SearchHandlers
     (each of them corresponds to one InvestigationStep)
     in dictionary clues_collector
     and then provide their verification with constraints
     :return: list of InvestigationResults
     """
     clues_collector = defaultdict(itertools.chain)
     for step, log_type in self._investigation_plan.investigation_steps_with_log_types:
         search_handler = SearchHandler(step, log_type)
         InvestigationUtils.merge_clue_dicts(
             clues_collector, search_handler.investigate(original_front_input, tmp_assign_to_log_type.get(log_type))
         )
     clues = self._save_clues_in_normal_dict(clues_collector)
     return self._constraints_verification(clues)
Beispiel #4
0
 def investigate(self, original_front_input, tmp_assign_to_log_type=EMPTY_FROZEN_DICT):
     """
     this function collects clues from SearchHandlers
     (each of them corresponds to one InvestigationStep)
     in dictionary clues_collector
     and then provide their verification with constraints
     :return: list of InvestigationResults
     """
     clues_collector = defaultdict(itertools.chain)
     for step, log_type in self._investigation_plan.investigation_steps_with_log_types:
         search_handler = SearchHandler(step, log_type)
         InvestigationUtils.merge_clue_dicts(
             clues_collector, search_handler.investigate(
                 original_front_input, tmp_assign_to_log_type.get(log_type)
             )
         )
     clues = self._save_clues_in_normal_dict(clues_collector)
     return self._constraints_verification(clues)