deterministic-id-checker

main
Rich Piazza 2024-08-19 15:45:28 -04:00
parent 50fd81fd6b
commit 33455bd3bc
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import json
import stix2
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__":
main()