From 44031207779cada8b80443e9af607b877b34c7e4 Mon Sep 17 00:00:00 2001 From: Sascha Rommelfangen Date: Wed, 10 May 2017 11:11:30 +0200 Subject: [PATCH] fixed bug if no TLP tag is found A default TLP tag from the list is selected in such a case. It is the last (and shall be the most restrictive) from the list. --- mail_to_misp.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mail_to_misp.py b/mail_to_misp.py index 71f7e79..af50245 100755 --- a/mail_to_misp.py +++ b/mail_to_misp.py @@ -39,6 +39,7 @@ externallist = config.externallist noidsflaglist = config.noidsflaglist malwaretags = config.malwaretags dependingtags = config.dependingtags +tlptag_default = config.tlptag_default # Ignore lines in body of message email_data = re.sub(".*From: .*\n?","", email_data) @@ -62,6 +63,7 @@ def init(url, key): return PyMISP(url, key, misp_verifycert, 'json') # Evaluate classification +tlp_tag = tlptag_default tlptags = config.tlptags for tag in tlptags: for alternativetag in tlptags[tag]: