mirror of https://github.com/MISP/misp-modules
commit
66c0cecb21
|
@ -41,7 +41,7 @@ jobs:
|
|||
- name: Run server in background
|
||||
run: |
|
||||
misp-modules -l 127.0.0.1 -s 2>error.log &
|
||||
sleep 5
|
||||
sleep 3
|
||||
- name: Check if server is running
|
||||
run: |
|
||||
curl -sS localhost:6666/healthcheck
|
||||
|
|
|
@ -39,6 +39,7 @@ import tornado.process
|
|||
from tornado.ioloop import IOLoop
|
||||
from tornado.concurrent import run_on_executor
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from pymisp import pymisp_json_default
|
||||
|
||||
try:
|
||||
from .modules import * # noqa
|
||||
|
@ -202,7 +203,7 @@ class QueryModule(tornado.web.RequestHandler):
|
|||
response = module.dict_handler(request=dict_payload)
|
||||
else:
|
||||
response = module.handler(q=json_payload)
|
||||
return json.dumps(response)
|
||||
return json.dumps(response, default=pymisp_json_default)
|
||||
|
||||
@tornado.gen.coroutine
|
||||
def post(self):
|
||||
|
@ -303,6 +304,9 @@ def main():
|
|||
return 1
|
||||
print(e)
|
||||
print("misp-modules might still be running.")
|
||||
else:
|
||||
log.exception(f"Could not listen on {args.listen}:{args.port}")
|
||||
return 1
|
||||
|
||||
log.info(f'MISP modules server started on {args.listen} port {args.port}')
|
||||
if args.test:
|
||||
|
|
Loading…
Reference in New Issue