INNER CODE UNIT · Python
check_mitre
montysecurity/C2-Tracker · opencti-connector/src/connector.py:121
def check_mitre():
mitre = False
data = {"pagination": {"hasNextPage": True, "endCursor": None}}
while data["pagination"]["hasNextPage"] and mitre == False:
after = data["pagination"]["endCursor"]
if after:
print("Listing indicators after " + after)
data = opencti_api_client.malware.list(
first=50,
after=after,
withPagination=True,
orderBy="created_at",
orderMode="asc",
)
for malware in data["entities"]:
if str(malware["createdBy"]["name"]) == "The MITRE Corporation":
mitre = True
print("MITRE is enabled")