2024-08-19 21:45:28 +02:00
|
|
|
import json
|
2024-08-20 15:30:59 +02:00
|
|
|
|
2024-08-19 21:45:28 +02:00
|
|
|
import stix2
|
|
|
|
|
2024-08-20 15:30:59 +02:00
|
|
|
|
2024-08-19 21:45:28 +02:00
|
|
|
def main():
|
|
|
|
with open("sco-examples-bundle.json", "r", encoding="utf-8") as examples:
|
|
|
|
all_examples = json.load(examples)
|
|
|
|
for obj in all_examples:
|
|
|
|
existing_id = obj["id"]
|
|
|
|
del obj["id"]
|
|
|
|
stix_obj = stix2.parse(obj)
|
|
|
|
print(f"id {existing_id} should be {stix_obj['id']}")
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2024-08-20 17:07:13 +02:00
|
|
|
main()
|