fix: [machinetag] skip_list supported for the listing of directory
parent
c60bf07d19
commit
92d74aa5fc
|
@ -38,12 +38,6 @@ taxonomies = []
|
||||||
# Get our current directory from file location
|
# Get our current directory from file location
|
||||||
thisDir = os.path.dirname(__file__)
|
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 = 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')
|
||||||
|
@ -55,6 +49,15 @@ args = argParser.parse_args()
|
||||||
if args.disable_skip_list:
|
if args.disable_skip_list:
|
||||||
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 = ''
|
doc = ''
|
||||||
if args.a:
|
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"
|
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"
|
||||||
|
|
Loading…
Reference in New Issue