PyMISP icon indicating copy to clipboard operation
PyMISP copied to clipboard

upload_stix function return nothing when using in-memory file

Open tomcangbk opened this issue 1 year ago • 0 comments

Hi, i got an issue when trying to upload stix2 event with in-memory file

import io
inmemoryfile = io.StringIO()
json.dump(stix_data, inmmemoryfile)
misp_event = misp.upload_stix(inmemoryfile) 

this code cannot added event and return no error also

i checked with dump stix_data to json file on disk and event added normally

https://github.com/MISP/PyMISP/blob/a7446b326320812b065ed36c8cb717217fcd4f36/pymisp/api.py#L3244 pymisp version: 2.4.183

tomcangbk avatar Mar 01 '24 04:03 tomcangbk