New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Event doesn't add object #932
Comments
can you print the response of |
|
the template you're using is lacking the |
The meta-category is added correctly.
|
Okay, so from what I see here, there are a few things:
|
My bad, wrong object template. This is the correct one.
|
Ok, can you try And it should be |
{ |
Okay, so PyMISP cannot find the template to pre-fill the required fields. The reason is that you're using Otherwise, you can keep using In order to avoid such issues, and get an exception in case the template cannot be loaded, I recommend you to pass |
Just making sure:
|
To the questions:
|
The template being available on the MISP web interface is good, but not related to the problem. The python script needs to open and read the file on the machine you're running the script, so the path you're currently passing will only work if you're running the script on the server, as root and from The value passed to |
I tried adding another object such as ais-info object from a local volume shared with a MISP container and with my code, the object was uploaded correctly. So I think that there is no need to run the script on the server as root and from I just changed the object name and the object attribute and it worked correctly. The problem is with my own object template that it isn't uploading into the event. I share the same code I used but with another object. This code works correctly with other objects and not with my object.
|
No, there is no need to run the script from the server, but the script needs to be able to access the file. Can you run |
As you can see, I put the wrong path of MISP objects but why is ais-info correctly added to the event? Also I added the new path to the code and it isn't still founding the object template. The new code is this:
|
The templates in misp-objects are bundled-in the package (see path), so you can get them by name without manually giving a path to the MISPObject class (that's the case for What is the error message you're getting? And are you running the python script from Also, as I was just making sure: the code is tested here. |
The error message I have is |
Got it. You started to use misp_objects_path_template, and I missed that. This parameter is not correct. You need to use And just to make sure we don't have another issue is |
Finally the error is solved using Kind regards. |
Hello.
I hope to add custom object to specific event using PyMISP. I'm using PyMISP 2.4.168.
When i tried it, it didn't work.
I did something like below first.
The object template is correctly added to the MISP instance. Also I can add the object in the GUI but no with PYMISP
No error are given, just the event updates itself with no objects inside.
Kind regards
The text was updated successfully, but these errors were encountered: