Merge pull request #41 from cvandeplas/master

dynamically build taxonomies list
pull/43/head
Alexandre Dulaunoy 2016-10-24 18:21:35 +02:00 committed by GitHub
commit b74b1f0d4e
1 changed files with 5 additions and 1 deletions

View File

@ -29,8 +29,12 @@
import json import json
import os.path import os.path
import argparse import argparse
import os
taxonomies = ['admiralty-scale', 'adversary', 'tlp', 'circl', 'iep', 'kill-chain', 'veris', 'ecsirt', 'enisa', 'dni-ism', 'europol-events', 'europol-incident', 'nato', 'euci', 'osint', 'csirt_case_classification', 'malware_classification', 'de-vs', 'fr-classif','eu-critical-sectors','dhs-ciip-sectors','estimative-language', 'ms-caro-malware', 'information-security-indicators', 'open-threat', 'misp', 'domain-abuse'] taxonomies = []
for folder in os.listdir('../'):
if os.path.isfile(os.path.join('../', folder, 'machinetag.json')):
taxonomies.append(folder)
argParser = argparse.ArgumentParser(description='Dump Machine Tags (Triple Tags) from MISP taxonomies', epilog='Available taxonomies are {0}'.format(taxonomies)) argParser = argparse.ArgumentParser(description='Dump Machine Tags (Triple Tags) from MISP taxonomies', epilog='Available taxonomies are {0}'.format(taxonomies))
argParser.add_argument('-e', action='store_true', help='Include expanded tags') argParser.add_argument('-e', action='store_true', help='Include expanded tags')
argParser.add_argument('-a', action='store_true', help='Generate asciidoctor document from MISP taxonomies') argParser.add_argument('-a', action='store_true', help='Generate asciidoctor document from MISP taxonomies')