chg: [Retro Hunt] add logs

pull/586/head
Terrtia 2022-06-16 16:31:58 +02:00
parent 99a3d248e1
commit 1ddf5a73ce
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
1 changed files with 5 additions and 1 deletions

View File

@ -65,9 +65,11 @@ class Retro_Hunt(AbstractModule):
# First launch # First launch
# restart # restart
rule = Tracker.get_retro_hunt_task_rule(task_uuid, r_compile=True) rule = Tracker.get_retro_hunt_task_rule(task_uuid, r_compile=True)
self.redis_logger.warning(f'{self.module_name}, Retro Hunt rule {rule}') rule_str = Tracker.get_retro_hunt_task_rule(task_uuid)
self.redis_logger.warning(f'{self.module_name}, Retro Hunt rule {rule_str}')
timeout = Tracker.get_retro_hunt_task_timeout(task_uuid) timeout = Tracker.get_retro_hunt_task_timeout(task_uuid)
self.redis_logger.warning(f'{self.module_name}, Retro Hunt rule {task_uuid} timeout {timeout}')
sources = Tracker.get_retro_hunt_task_sources(task_uuid, r_sort=True) sources = Tracker.get_retro_hunt_task_sources(task_uuid, r_sort=True)
self.date_from = Tracker.get_retro_hunt_task_date_from(task_uuid) self.date_from = Tracker.get_retro_hunt_task_date_from(task_uuid)
@ -96,6 +98,8 @@ class Retro_Hunt(AbstractModule):
# save current item in cache # save current item in cache
Tracker.set_cache_retro_hunt_task_id(task_uuid, id) Tracker.set_cache_retro_hunt_task_id(task_uuid, id)
self.redis_logger.warning(f'{self.module_name}, Retro Hunt rule {task_uuid}, searching item {id}')
yara_match = rule.match(data=self.item.get_content(), callback=self.yara_rules_match, which_callbacks=yara.CALLBACK_MATCHES, timeout=timeout) yara_match = rule.match(data=self.item.get_content(), callback=self.yara_rules_match, which_callbacks=yara.CALLBACK_MATCHES, timeout=timeout)
# save last item # save last item