mirror of https://github.com/MISP/misp-modules
Merge branch 'main' of github.com:MISP/misp-modules
commit
88962aba19
|
@ -9,7 +9,7 @@ moduleinfo = {
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"author": "Shivam Sandbhor <shivam@crowdsec.net>",
|
"author": "Shivam Sandbhor <shivam@crowdsec.net>",
|
||||||
"description": "Module to access CrowdSec CTI API.",
|
"description": "Module to access CrowdSec CTI API.",
|
||||||
"module-type": ["hover"],
|
"module-type": ["hover", "expansion"],
|
||||||
}
|
}
|
||||||
moduleconfig = ["api_key", "api_version"]
|
moduleconfig = ["api_key", "api_version"]
|
||||||
|
|
||||||
|
@ -25,8 +25,7 @@ def handler(q=False):
|
||||||
if not request["config"].get("api_key"):
|
if not request["config"].get("api_key"):
|
||||||
return {"error": "Missing CrowdSec API key"}
|
return {"error": "Missing CrowdSec API key"}
|
||||||
|
|
||||||
if not request["config"].get("api_version"):
|
request["config"]["api_version"] = "v2"
|
||||||
return {"error": "Missing CrowdSec API version parameter"}
|
|
||||||
|
|
||||||
if request["config"]["api_version"] == "v2":
|
if request["config"]["api_version"] == "v2":
|
||||||
return _handler_v2(request)
|
return _handler_v2(request)
|
||||||
|
|
Loading…
Reference in New Issue