From a9485028f2d942176e3733552086855d2934e422 Mon Sep 17 00:00:00 2001 From: 0x221E Date: Tue, 27 Jan 2026 21:19:25 +0100 Subject: [PATCH] Patch: Rename variable 'a' to 'formatted_alert' Patch: Add json library --- custom-wazuh.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/custom-wazuh.py b/custom-wazuh.py index 1be81bd..0b5ad47 100644 --- a/custom-wazuh.py +++ b/custom-wazuh.py @@ -1,5 +1,6 @@ import sys import alert +import json import logging import iris_api from datetime import datetime @@ -25,16 +26,16 @@ def main(): formatted_alert = processor.process(alert_json) - alert_result = client.alert(a.to_IRIS()) + alert_result = client.alert(formatted_alert.to_IRIS()) match = None for case in client.cases_list(): - if a.srcip in case["case_name"]: + if formatted_alert.srcip in case["case_name"]: match = case if match == None: - client.case_new(a.srcip, a.title) + client.case_new(formatted_alert.srcip, formatted_alert.title) else: iocs = []