mirror of https://github.com/MISP/misp-modules
fix: [website] misp-objects submodule
parent
a2721c967b
commit
e737605c1b
|
@ -2,6 +2,3 @@
|
|||
path = misp_modules/lib/misp-objects
|
||||
url = https://github.com/MISP/misp-objects.git
|
||||
branch = main
|
||||
[submodule "website/data/misp-objects"]
|
||||
path = website/data/misp-objects
|
||||
url = https://github.com/MISP/misp-objects
|
||||
|
|
|
@ -4,6 +4,7 @@ import json
|
|||
import requests
|
||||
# import jsonschema
|
||||
from config import Config
|
||||
from pathlib import Path
|
||||
|
||||
MODULES = []
|
||||
|
||||
|
@ -39,7 +40,9 @@ def isUUID(uid):
|
|||
return False
|
||||
|
||||
def get_object(obj_name):
|
||||
loc_path = os.path.join(os.getcwd(), "data", "misp-objects", "objects")
|
||||
path = Path(os.getcwd())
|
||||
parent_path = path.parent.absolute()
|
||||
loc_path = os.path.join(parent_path, "misp_modules", "lib", "misp-objects", "objects")
|
||||
if os.path.isdir(loc_path):
|
||||
with open(os.path.join(loc_path, obj_name, "definition.json"), "r") as read_json:
|
||||
loc_json = json.load(read_json)
|
||||
|
|
Loading…
Reference in New Issue