Merge pull request #510 from AndreC10002/patch-2

Update generate.py - define the number of entries to output
pull/515/head
Raphaël Vinot 2020-01-03 13:19:09 +01:00 committed by GitHub
commit 5a7f632d46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ import sys
import json
import os
from pymisp import ExpandedPyMISP
from settings import url, key, ssl, outputdir, filters, valid_attribute_distribution_levels
from settings import entries, url, key, ssl, outputdir, filters, valid_attribute_distribution_levels
valid_attribute_distributions = []
@ -52,7 +52,7 @@ def saveManifest(manifest):
if __name__ == '__main__':
misp = init()
try:
events = misp.search(metadata=True, limit=200, **filters, pythonify=True)
events = misp.search(metadata=True, limit=entries, **filters, pythonify=True)
except Exception as e:
print(e)
sys.exit("Invalid response received from MISP.")