Merge pull request #68 from PaulSec/patch-1

Updated last.py to dump json results straight away
pull/77/head
Raphaël Vinot 2017-04-06 16:10:29 +02:00 committed by GitHub
commit 8796d49ed3
1 changed files with 1 additions and 3 deletions

View File

@ -26,9 +26,7 @@ def download_last(m, last, out=None):
exit(0) exit(0)
else: else:
with open(out, 'w') as f: with open(out, 'w') as f:
for e in result['response']: f.write(json.dumps(result['response']))
f.write(json.dumps(e) + '\n')
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Download latest events from a MISP instance.') parser = argparse.ArgumentParser(description='Download latest events from a MISP instance.')