new: Added ability to set collections

pull/22/head
Hannah Ward 2017-07-26 14:40:49 +01:00
parent c2846fd5d9
commit e271c95979
No known key found for this signature in database
GPG Key ID: 6F3BAD60DE190290
2 changed files with 8 additions and 1 deletions

View File

@ -29,3 +29,10 @@ zmq:
misp:
url: "http://localhost"
api: KEY
taxii:
auth:
username: ABC
password: CDE
collections:
- collection

View File

@ -75,7 +75,7 @@ while True:
try:
cli.push(pkg.to_xml().decode("utf-8"), "urn:stix.mitre.org:xml:1.1.1",
uri="http://{}/services/inbox".format(config["domain"]),
collection_names=["collection"])
collection_names=config["taxii"].get("collections", ["collection"]))
log.info("Pushed!")
except Exception as ex: