From 92b6b0987504f76e00fd6e49c841427fe810ad86 Mon Sep 17 00:00:00 2001 From: Sebastien Larinier Date: Fri, 29 Mar 2024 16:46:58 +0100 Subject: [PATCH] change iter by list --- plugins/feeds/public/otx_alienvault.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/feeds/public/otx_alienvault.py b/plugins/feeds/public/otx_alienvault.py index 0534b4ea7..3ae2d6c4a 100644 --- a/plugins/feeds/public/otx_alienvault.py +++ b/plugins/feeds/public/otx_alienvault.py @@ -114,11 +114,10 @@ def analyze(self, item): except Exception as e: logging.error(f"Error compiling YARA rule: {e}") continue - - for t in r: - ind_obj.name = t.identifier - if "description" in t.meta: - ind_obj.description = t.meta["description"] + t = list(r)[0] + ind_obj.name = t.identifier + if "description" in t.meta: + ind_obj.description = t.meta["description"] ind_obj.pattern = otx_indic["content"] ind_obj.save()