Example file on how to get the exported IDS data from MISP

pull/435/head
Koen Van Impe 2015-03-15 02:20:50 +01:00
parent 1ede687c63
commit f36304e635
2 changed files with 23 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,23 @@
#!/usr/bin/python
'''
Example file on how to get the exported IDS data from MISP
Add your API key, set the MISP host and define the output file.
'''
import urllib2
MISP_HOST="http:/"
API_KEY=""
EXPORT_DATA="events/nids/suricata/download"
OUTPUT_FILE="misp-suricata"
URL="%s/%s" % (MISP_HOST, EXPORT_DATA)
request = urllib2.Request(URL)
f = open(OUTPUT_FILE,'w')
request.add_header('Authorization', API_KEY)
data = urllib2.urlopen(request).read()
f.write(data)
f.close()