|
12 | 12 | import tempfile |
13 | 13 | import time |
14 | 14 |
|
15 | | -# FIXME from galaxy 'to MISP Event' is confusing |
16 | | - |
17 | 15 | __version__ = '1.4.4' # also update version in setup.py |
18 | 16 |
|
19 | 17 | tag_note_prefixes = ['tlp:', 'PAP:', 'de-vs:', 'euci:', 'fr-classif:', 'nato:'] |
@@ -205,15 +203,15 @@ def attribute_to_entity(a, link_label=None, event_tags=[], only_self=False): |
205 | 203 |
|
206 | 204 | # complement the event tags with the attribute tags. |
207 | 205 | if 'Tag' in a and not only_self: |
208 | | - for t in a['Tag']: |
209 | | - combined_tags.append(t['name']) |
210 | | - # ignore all misp-galaxies |
211 | | - if t['name'].startswith('misp-galaxy'): |
212 | | - continue |
213 | | - # ignore all those we add as notes |
214 | | - if tag_matches_note_prefix(t['name']): |
215 | | - continue |
216 | | - yield Hashtag(t['name'], bookmark=Bookmark.Green) |
| 206 | + for t in a['Tag']: |
| 207 | + combined_tags.append(t['name']) |
| 208 | + # ignore all misp-galaxies |
| 209 | + if t['name'].startswith('misp-galaxy'): |
| 210 | + continue |
| 211 | + # ignore all those we add as notes |
| 212 | + if tag_matches_note_prefix(t['name']): |
| 213 | + continue |
| 214 | + yield Hashtag(t['name'], bookmark=Bookmark.Green) |
217 | 215 |
|
218 | 216 | notes = convert_tags_to_note(combined_tags) |
219 | 217 |
|
@@ -251,7 +249,7 @@ def attribute_to_entity(a, link_label=None, event_tags=[], only_self=False): |
251 | 249 |
|
252 | 250 | # not supported in our maltego mapping are not handled |
253 | 251 |
|
254 | | - # LATER : relationships from attributes - not yet supported by MISP yet, but there are references in the datamodel |
| 252 | + # LATER relationships from attributes - not yet supported by MISP yet, but there are references in the datamodel |
255 | 253 |
|
256 | 254 |
|
257 | 255 | def object_to_attributes(o, e): |
@@ -293,7 +291,7 @@ def get_attribute_in_object(o, attribute_type=False, attribute_value=False, drop |
293 | 291 | if drop: # drop the attribute from the object |
294 | 292 | o['Attribute'].pop(i) |
295 | 293 | break |
296 | | - # TODO implement substring matching |
| 294 | + # substring matching |
297 | 295 | if substring: |
298 | 296 | keyword = attribute_value.strip('%') |
299 | 297 | if attribute_value.startswith('%') and attribute_value.endswith('%'): |
|
0 commit comments