mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 09:47:17 +00:00
remove dict from Trackers
This commit is contained in:
parent
2e880c79ca
commit
ecc16d1004
3 changed files with 3 additions and 3 deletions
|
@ -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 a new issue