You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've read from the training material related to MISP modules that we can query a module via REST API.
Based on the example query provided on the github to test the DNS module, I would like to query the csvimport module.
The way i do it
By inspecting csvimport.py handler function source code, i've made up a json payload that look like this:
I request the csvimport by this command: curl -s http://127.0.0.1:6666/query -H "Content-Type: application/json" --data @body7.json -X POST
The problem is that i get stuck into the start of the handler (I don't know what to put in the data field in order to pass the first if else) :
def handler(q=False):
if q is False:
return False
request = json.loads(q)
if request.get('data'):
try:
data = base64.b64decode(request['data']).decode('utf-8')
except UnicodeDecodeError:
misperrors['error'] = "Input is not valid UTF-8"
return misperrors
else:
misperrors['error'] = "Unsupported attributes type" <-- Here comes the error
return misperrors
...
Any Help would be more than welcome
The text was updated successfully, but these errors were encountered:
What I am trying to do
I've read from the training material related to MISP modules that we can query a module via REST API.
Based on the example query provided on the github to test the DNS module, I would like to query the
csvimport
module.The way i do it
By inspecting csvimport.py handler function source code, i've made up a
json payload
that look like this:I request the csvimport by this command:
curl -s http://127.0.0.1:6666/query -H "Content-Type: application/json" --data @body7.json -X POST
The problem is that i get stuck into the start of the handler (I don't know what to put in the
data
field in order to pass the firstif else
) :Any Help would be more than welcome
The text was updated successfully, but these errors were encountered: