mirror of https://github.com/CIRCL/AIL-framework
remove dict from Trackers
parent
2e880c79ca
commit
ecc16d1004
|
@ -95,7 +95,7 @@ class Tracker_Regex(AbstractModule):
|
||||||
NotificationHelper.sendEmailNotification(mail, mail_subject, mail_body)
|
NotificationHelper.sendEmailNotification(mail, mail_subject, mail_body)
|
||||||
webhook_to_post = Term.get_term_webhook(tracker_uuid)
|
webhook_to_post = Term.get_term_webhook(tracker_uuid)
|
||||||
if webhook_to_post:
|
if webhook_to_post:
|
||||||
request_body = dict({"itemId": item_id, "url": self.full_item_url, "type": "REGEX"})
|
request_body = {"itemId": item_id, "url": self.full_item_url, "type": "REGEX"}
|
||||||
r = requests.post(webhook_to_post, data=request_body)
|
r = requests.post(webhook_to_post, data=request_body)
|
||||||
if (r.status_code >= 400):
|
if (r.status_code >= 400):
|
||||||
raise Exception(f"Webhook request failed for {webhook_to_post}\nReason: {r.reason}")
|
raise Exception(f"Webhook request failed for {webhook_to_post}\nReason: {r.reason}")
|
||||||
|
|
|
@ -141,7 +141,7 @@ class Tracker_Term(AbstractModule):
|
||||||
|
|
||||||
webhook_to_post = Term.get_term_webhook(term_uuid)
|
webhook_to_post = Term.get_term_webhook(term_uuid)
|
||||||
if webhook_to_post:
|
if webhook_to_post:
|
||||||
request_body = dict({"itemId": item_id, "url": self.full_item_url, "type": "Term", "term": term})
|
request_body = {"itemId": item_id, "url": self.full_item_url, "type": "Term", "term": term}
|
||||||
r = requests.post(webhook_to_post, data=request_body)
|
r = requests.post(webhook_to_post, data=request_body)
|
||||||
if (r.status_code >= 400):
|
if (r.status_code >= 400):
|
||||||
raise Exception(f"Webhook request failed for {webhook_to_post}\nReason: {r.reason}")
|
raise Exception(f"Webhook request failed for {webhook_to_post}\nReason: {r.reason}")
|
||||||
|
|
|
@ -98,7 +98,7 @@ class Tracker_Yara(AbstractModule):
|
||||||
NotificationHelper.sendEmailNotification(mail, mail_subject, mail_body)
|
NotificationHelper.sendEmailNotification(mail, mail_subject, mail_body)
|
||||||
webhook_to_post = Term.get_term_webhook(tracker_uuid)
|
webhook_to_post = Term.get_term_webhook(tracker_uuid)
|
||||||
if webhook_to_post:
|
if webhook_to_post:
|
||||||
request_body = dict({"itemId": item_id, "url": self.full_item_url, "type": "YARA"})
|
request_body = {"itemId": item_id, "url": self.full_item_url, "type": "YARA"}
|
||||||
r = requests.post(webhook_to_post, data=request_body)
|
r = requests.post(webhook_to_post, data=request_body)
|
||||||
if (r.status_code >= 400):
|
if (r.status_code >= 400):
|
||||||
raise Exception(f"Webhook request failed for {webhook_to_post}\nReason: {r.reason}")
|
raise Exception(f"Webhook request failed for {webhook_to_post}\nReason: {r.reason}")
|
||||||
|
|
Loading…
Reference in New Issue