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 = []