Patch: Rename variable 'a' to 'formatted_alert'
Patch: Add json library
This commit is contained in:
@@ -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 = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user