diff --git a/tools/machinetag.py b/tools/machinetag.py index d67ec1c..73a2f8e 100755 --- a/tools/machinetag.py +++ b/tools/machinetag.py @@ -38,12 +38,6 @@ taxonomies = [] # Get our current directory from file location thisDir = os.path.dirname(__file__) -for folder in os.listdir(os.path.join(thisDir, '../')): - if os.path.isfile(os.path.join(thisDir, '../', folder, 'machinetag.json')): - taxonomies.append(folder) - -taxonomies.sort() - 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('-a', action='store_true', help='Generate asciidoctor document from MISP taxonomies') @@ -55,6 +49,15 @@ args = argParser.parse_args() if args.disable_skip_list: skip_list = '' +for folder in os.listdir(os.path.join(thisDir, '../')): + if os.path.isfile(os.path.join(thisDir, '../', folder, 'machinetag.json')): + if folder in skip_list: + continue + taxonomies.append(folder) + +taxonomies.sort() + + doc = '' if args.a: dedication = "\n[dedication]\n== Funding and Support\nThe MISP project is financially and resource supported by https://www.circl.lu/[CIRCL Computer Incident Response Center Luxembourg ].\n\nimage:{images-misp}logo.png[CIRCL logo]\n\nA CEF (Connecting Europe Facility) funding under CEF-TC-2016-3 - Cyber Security has been granted from 1st September 2017 until 31th August 2019 as ***Improving MISP as building blocks for next-generation information sharing***.\n\nimage:{images-misp}en_cef.png[CEF funding]\n\nIf you are interested to co-fund projects around MISP, feel free to get in touch with us.\n\n"