MISP / MISP-Taxii-Server

An OpenTAXII Configuration for MISP
BSD 3-Clause "New" or "Revised" License
80 stars 30 forks source link

str object has no attribute decode #26

Closed travisll closed 7 years ago

travisll commented 7 years ago

I know I am just missing something, but I cant figure out what I am missing. Everything installed just fine, I run opentaxii-run-dev and then run taxii-push --path http://localhost:9000/services/inbox -f tests/sample.xml --dest collection --username root --password root -v

and the following error below comes up on the opentaxii server and I get the error Failure: there was a failure while executing the message handler.

Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/Flask-0.12.2-py3.5.egg/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.5/dist-packages/Flask-0.12.2-py3.5.egg/flask/app.py", line 1598, in dispatch_request return self.view_functionsrule.endpoint File "/usr/local/lib/python3.5/dist-packages/opentaxii-0.1.10a1-py3.5.egg/opentaxii/middleware.py", line 76, in wrapper return _process_with_service(service) File "/usr/local/lib/python3.5/dist-packages/opentaxii-0.1.10a1-py3.5.egg/opentaxii/middleware.py", line 154, in _process_with_service response_message = service.process(request.headers, taxii_message) File "/usr/local/lib/python3.5/dist-packages/opentaxii-0.1.10a1-py3.5.egg/opentaxii/taxii/services/abstract.py", line 89, in process in_response_to=message.message_id) File "/usr/local/lib/python3.5/dist-packages/opentaxii-0.1.10a1-py3.5.egg/opentaxii/taxii/exceptions.py", line 48, in raise_failure tb=tb) File "/usr/local/lib/python3.5/dist-packages/six.py", line 692, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.5/dist-packages/opentaxii-0.1.10a1-py3.5.egg/opentaxii/taxii/services/abstract.py", line 83, in process response_message = handler.handle_message(self, message) File "/usr/local/lib/python3.5/dist-packages/opentaxii-0.1.10a1-py3.5.egg/opentaxii/taxii/services/handlers/inbox_message_handlers.py", line 126, in handle_message return InboxMessage11Handler.handle_message(service, request) File "/usr/local/lib/python3.5/dist-packages/opentaxii-0.1.10a1-py3.5.egg/opentaxii/taxii/services/handlers/inbox_message_handlers.py", line 65, in handle_message inbox_message_id=inbox_message.id if inbox_message else None) File "/usr/local/lib/python3.5/dist-packages/opentaxii-0.1.10a1-py3.5.egg/opentaxii/persistence/manager.py", line 164, in create_content collection_ids=collection_ids, service_id=service_id) File "/usr/local/lib/python3.5/dist-packages/blinker-1.4-py3.5.egg/blinker/base.py", line 267, in send for receiver in self.receivers_for(sender)] File "/usr/local/lib/python3.5/dist-packages/blinker-1.4-py3.5.egg/blinker/base.py", line 267, in for receiver in self.receivers_for(sender)] File "/usr/local/lib/python3.5/dist-packages/misp_taxii_hooks-0.2-py3.5.egg/misp_taxii_hooks/hooks.py", line 58, in post_stix package = pymisp.tools.stix.load_stix(StringIO(content_block.content.decode())) opentaxii.taxii.exceptions.FailureStatus: 'str' object has no attribute 'decode', logger=opentaxii.middleware, event=Status exception, level=warning, timestamp=2017-11-02T17:53:15.401407Z} 127.0.0.1 - - [02/Nov/2017 12:53:15] "POST /services/inbox HTTP/1.1" 200 -

FloatingGhost commented 7 years ago

I hate stix so much

fixed. Pull and try again.

travisll commented 7 years ago

Perfect, that fixed out.. Thank you

On Nov 3, 2017, at 6:49 AM, Hannah Ward notifications@github.com wrote:

I hate stix so much

fixed. Pull and try again.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MISP/MISP-Taxii-Server/issues/26#issuecomment-341682874, or mute the thread https://github.com/notifications/unsubscribe-auth/AAm7kxpWroHKEjP4EVABwow0NXdM7CJnks5syv3XgaJpZM4QQIeK.