Update threatStream_misp_export.py

pull/148/head
Robert Nixon 2018-01-08 12:09:23 -05:00 committed by GitHub
parent 1d2f3d9c3c
commit 85f1a9bd91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -20,10 +20,10 @@ moduleinfo = {
}
moduleconfig = ["Default_Source"]
moduleconfig = []
# Map of MISP fields => ThreatStream itypes
# Map of MISP fields => ThreatStream itypes, you can modify this to your liking
fieldmap = {
"domain": "mal_domain",
"hostname": "mal_domain",
@ -49,10 +49,9 @@ def handler(q=False):
if q is False or not q:
return False
# Check if we were given a configuration
request = json.loads(q)
config = request.get("config", {"Default_Source": ""})
logging.info("Setting config to: %s", config)
response = io.StringIO()
writer = csv.DictWriter(response, fieldnames=["value", "itype", "tags"])