Coder Social home page Coder Social logo

Comments (9)

FloatingGhost avatar FloatingGhost commented on June 28, 2024

what, like doing

n = pymisp.new_event(info="test")
# add attribs
pymisp.publish(n)

doesn't work?

from pymisp.

kralca avatar kralca commented on June 28, 2024

from pymisp.

FloatingGhost avatar FloatingGhost commented on June 28, 2024
p = PyMISP(...)
event = p.new_event(info="some published event", published=True)

works

Works as intended. Publishes event upon creation.

OH I get you, I get what you mean

It unpublishes after you add a new thing

from pymisp.

kralca avatar kralca commented on June 28, 2024

from pymisp.

FloatingGhost avatar FloatingGhost commented on June 28, 2024

I think this is a MISP-side bug, lemme go check that :)

from pymisp.

FloatingGhost avatar FloatingGhost commented on June 28, 2024

Ok yep, pretty sure this is a MISP-side bug
Have raised it on the main repo - give it a little while :)

from pymisp.

kralca avatar kralca commented on June 28, 2024

I wonder if this behaviour in MISP (i.e. 'unpublish' after adding new attributes) is intended so that there needs to be a conscious decision to publish the new attributes.

Perhaps it is better to use PyMISP as follows (for example):

p = PyMISP(...)
event = p.new_event(info="some published event", published=False)
p.add_filename(event, 'some_file_name')
p.publish(event)

This seems to work.

Note there is a bug in PyMISP with the above approach when you set 'published=True' in the call to new_event() and later call p.publish(event) PyMISP thinks the event is already published and doesn't update the event in MISP.

from pymisp.

iglocska avatar iglocska commented on June 28, 2024

from pymisp.

Rafiot avatar Rafiot commented on June 28, 2024

I added a method that will solve your problem and doesn't expect you to have the whole MISP event in memory to publish.

from pymisp.

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.