Giter Site home page Giter Site logo

Comments (6)

davidonzo avatar davidonzo commented on June 23, 2024

Any hint?

from misp-taxii-server.

davidonzo avatar davidonzo commented on June 23, 2024

Ok, it should be fixed. Anyway, It works for me, but I hope in your code review.

03ab0c9

Thanks in advance.

from misp-taxii-server.

faustus25 avatar faustus25 commented on June 23, 2024

@davidonzo

Receiving the same issue as above, despite updating to the latest commit:
Updating 185c7e5..5192d90 Fast-forward .github/ISSUE_TEMPLATE.md | 3 +++ .gitignore | 1 + MISP-STIX-Converter | 2 +- README.md | 3 +-- misp_taxii_hooks/hooks.py | 9 +++++++-- 5 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE.md git submodule update --init --force Submodule path 'MISP-STIX-Converter': checked out '27089ac16e7f6b790f310d16394ba0d986529f29' Submodule path 'OpenTAXII': checked out '164d873c91c311845b2ca35039c2545eeadb23c8' Submodule path 'PyMISP': checked out '41b5672360e321604543b4384714d72a28a5881b'`

During handling of the above exception, another exception occurred:

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_functions[rule.endpoint](**req.view_args)
  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 <listcomp>
    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 82, in post_stix
    MISP.add_event(package._json_full())
opentaxii.taxii.exceptions.FailureStatus: 'MISPEvent' object has no attribute '_json_full', event=Status exception, timestamp=2017-11-29T10:52:41.460427Z, logger=opentaxii.middleware, level=warning}
127.0.0.1 - - [29/Nov/2017 10:52:41] "POST /services/inbox HTTP/1.1" 200 -
'bWlzcDptaXNwMTIzNA==' 20
Posting STIX...
Building Event...
Using title STIX Import
STIX loaded succesfully.
Extracted ['http://www.flyracing.pl/wp-admin/css/sslml/']
Checking for existence of http://www.flyracing.pl/wp-admin/css/sslml/
/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
http://www.flyracing.pl/wp-admin/css/sslml/ is unique, we'll keep it
Uploading event to MISP with attributes ['http://www.flyracing.pl/wp-admin/css/sslml/']
2017-11-29T10:52:41.562760Z [opentaxii.middleware] warning: Status exception {exception=Traceback (most recent call last):
  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 <listcomp>
    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 82, in post_stix
    MISP.add_event(package._json_full())
AttributeError: 'MISPEvent' object has no attribute '_json_full'

Anything else that needs to be edited?

from misp-taxii-server.

FloatingGhost avatar FloatingGhost commented on June 23, 2024

:ANGERY:

This is the third time I've had to say "UPDATE IT".

Now if you did some basic searching (which you should have done), you'd see that the error was at misp_taxii_hooks/hooks.py", line 82, in post_stix

Now if we're to look at that line you'd see that the code you're running is not the same.

UPDATE.

from misp-taxii-server.

FloatingGhost avatar FloatingGhost commented on June 23, 2024

Genuinely annoys me when obviously people haven't done the most basic attempts to fix things.

Why should I bother to help you if you're not going to put in some really low-level of effort?

Please don't do it again.

from misp-taxii-server.

faustus25 avatar faustus25 commented on June 23, 2024

@FloatingGhost: yes checked the hooks.py script after updating it and output is below HENCE why I ask

Updating 185c7e5..5192d90
Fast-forward
 .github/ISSUE_TEMPLATE.md | 3 +++
 .gitignore                | 1 +
 MISP-STIX-Converter       | 2 +-
 README.md                 | 3 +--
 misp_taxii_hooks/hooks.py | 9 +++++++--

MISP-Taxii-Server/misp_taxii_hooks/hooks.py

  76      # Push the event to MISP
    77      # TODO: There's probably a proper method to do this rather than json_full
    78      # But I don't wanna read docs
    79      if (len(package.attributes) > 0):
    80          log.info("Uploading event to MISP with attributes %s", [x.value for x in package.attributes])
    81          MISP.add_event(package)
    82      else:
    83          log.info("No attributes, not bothering.")
    84
    85  # Make TAXII call our push function whenever it gets new data
    86  CONTENT_BLOCK_CREATED.connect(post_stix)

Line 81 does not contain the ".jsonfull()" anymore:

MISP.add_event(package._json_full())

from misp-taxii-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.