mirror of https://github.com/MISP/mail_to_misp
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.pull/4/head
parent
72be27e780
commit
4403120777
|
@ -39,6 +39,7 @@ externallist = config.externallist
|
||||||
noidsflaglist = config.noidsflaglist
|
noidsflaglist = config.noidsflaglist
|
||||||
malwaretags = config.malwaretags
|
malwaretags = config.malwaretags
|
||||||
dependingtags = config.dependingtags
|
dependingtags = config.dependingtags
|
||||||
|
tlptag_default = config.tlptag_default
|
||||||
|
|
||||||
# Ignore lines in body of message
|
# Ignore lines in body of message
|
||||||
email_data = re.sub(".*From: .*\n?","", email_data)
|
email_data = re.sub(".*From: .*\n?","", email_data)
|
||||||
|
@ -62,6 +63,7 @@ def init(url, key):
|
||||||
return PyMISP(url, key, misp_verifycert, 'json')
|
return PyMISP(url, key, misp_verifycert, 'json')
|
||||||
|
|
||||||
# Evaluate classification
|
# Evaluate classification
|
||||||
|
tlp_tag = tlptag_default
|
||||||
tlptags = config.tlptags
|
tlptags = config.tlptags
|
||||||
for tag in tlptags:
|
for tag in tlptags:
|
||||||
for alternativetag in tlptags[tag]:
|
for alternativetag in tlptags[tag]:
|
||||||
|
|
Loading…
Reference in New Issue