Merge branch 'master' of github.com:MISP/PyMISP

pull/464/head
Raphaël Vinot 2019-09-13 14:33:09 +02:00
commit 266b7abfcd
2 changed files with 8 additions and 2 deletions

View File

@ -4,3 +4,4 @@
misp_url = 'https://<your MISP URL>/'
misp_key = 'Your MISP auth key' # The MISP auth key can be found on the MISP web interface under the automation section
misp_verifycert = True
misp_client_cert = ''

View File

@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
from pymisp import ExpandedPyMISP
from keys import misp_url, misp_key, misp_verifycert
from keys import misp_url, misp_key, misp_verifycert, misp_client_cert
import argparse
import os
@ -23,7 +23,12 @@ if __name__ == '__main__':
print('Output file already exists, aborted.')
exit(0)
misp = ExpandedPyMISP(misp_url, misp_key, misp_verifycert)
if misp_client_cert == '':
misp_client_cert = None
else:
misp_client_cert = (misp_client_cert)
misp = ExpandedPyMISP(misp_url, misp_key, misp_verifycert, cert=misp_client_cert)
result = misp.search(publish_timestamp=args.last, limit=args.limit, page=args.page, pythonify=True)
if not result: