mirror of
https://github.com/DISARMFoundation/DISARMframeworks.git
synced 2025-06-06 22:18:53 -04:00
fix: [code] Fix MISP Galaxy value without ID
This commit is contained in:
parent
d2ca8fbcc7
commit
f12df578ab
1 changed files with 4 additions and 4 deletions
|
@ -50,12 +50,12 @@ class DisarmGalaxy:
|
||||||
'uuid': str(uuid.uuid5(uuid.UUID("9319371e-2504-4128-8410-3741cebbcfd3"), 'disarm-cluster-techniques')),
|
'uuid': str(uuid.uuid5(uuid.UUID("9319371e-2504-4128-8410-3741cebbcfd3"), 'disarm-cluster-techniques')),
|
||||||
'values': [],
|
'values': [],
|
||||||
'version': 1}
|
'version': 1}
|
||||||
|
values = []
|
||||||
df = self.disarm.df_techniques
|
df = self.disarm.df_techniques
|
||||||
for i in range(len(df)):
|
for i in range(len(df)):
|
||||||
t = {
|
t = {
|
||||||
'uuid': str(uuid.uuid5(uuid.UUID("9319371e-2504-4128-8410-3741cebbcfd3"), df.values[i][0])),
|
'uuid': str(uuid.uuid5(uuid.UUID("9319371e-2504-4128-8410-3741cebbcfd3"), df.values[i][0])),
|
||||||
'value': f"{df.values[i][0]} - {df.values[i][1]}",
|
'value': f"{df.values[i][1]}",
|
||||||
'description': df.values[i][4],
|
'description': df.values[i][4],
|
||||||
'meta': {
|
'meta': {
|
||||||
'external_id': df.values[i][0],
|
'external_id': df.values[i][0],
|
||||||
|
@ -68,8 +68,8 @@ class DisarmGalaxy:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cluster['values'].append(t)
|
values.append(t)
|
||||||
|
cluster['values'] = sorted(values, key=lambda x: x['meta']['external_id'])
|
||||||
self.write_json_file(os.path.join(self.out_path, 'clusters', 'disarm-techniques.json'), cluster)
|
self.write_json_file(os.path.join(self.out_path, 'clusters', 'disarm-techniques.json'), cluster)
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue