Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Microsoft threat actory taxonomy to misp format converter
import uuid
from pprint import pprint
import json
import requests
def main():
URL = ""
r = requests.get(URL)
lcluster = []
for entry in r.json():
cluster = {
'value': entry["New name"],
'meta': {
'sector': entry["Origin/Threat"],
'synonyms': [entry["Previous name"]] + entry["Other names"],
'refs': [
'uuid': str(uuid.uuid5(uuid.UUID("76beed5f-7251-457e-8c2a-b45f7b589d3d"), f"{entry['New name']}")),
x = sorted(lcluster, key=lambda x: x["value"])
if __name__ == '__main__':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment