Clusters and elements to attach to MISP events or attributes (like threat actors) https://www.misp-project.org/galaxy.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 rivejä
764 B

  1. #!/usr/bin/env python3
  2. # coding=utf-8
  3. """
  4. Tools to find empty string entries in galaxies
  5. """
  6. from .chk_dup import loadjsons
  7. import sys
  8. if __name__ == '__main__':
  9. jsons = loadjsons("clusters", return_paths=True)
  10. retval = 0
  11. for clustername, djson in jsons:
  12. items = djson.get('values')
  13. for entry in items:
  14. name = entry.get('value')
  15. for key, value in entry.get('meta', {}).items():
  16. if isinstance(value, list):
  17. if '' in value:
  18. retval = 1
  19. print("Empty string found in Cluster %r: values/%s/meta/%s"
  20. "" % (clustername, name, key),
  21. file=sys.stderr)
  22. sys.exit(retval)