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
Sascha Rommelfangen 2017-05-10 11:11:30 +02:00
parent 72be27e780
commit 4403120777
1 changed files with 2 additions and 0 deletions

View File

@ -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]: