Update PyMISP_tutorial.ipynb

The function to collect event_id and put it into a list isn't looking into each MISPAttribute.
Just updated the script to look it.
pull/383/head
Carlos Borges 2019-04-26 17:15:45 -03:00 committed by GitHub
parent 582dda0ce2
commit 47729c413f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -358,9 +358,10 @@
"# And the to_ids flag is set\n",
"attributes = misp.search(controller='attributes', type_attribute='ip-src', to_ids=0, pythonify=True)\n",
"\n",
"# Collect all event_id matching the searched attribute\n",
"event_ids = set()\n",
"for attr in attributes:\n",
" event_ids.add(event_id)\n",
" event_ids.add(attr.event_id)\n",
"\n",
"# Fetch all related events\n",
"for event_id in event_ids:\n",