You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the second command to create the LOLBAS md files I get the following error:
└─# python3 generator.py lolbas build -od MyVault/LOLBAS/ 1 ⨯
2022-12-21 16:08:08,505 - main - INFO - Executing utility module: <lib.utils.lolbas.Build object at 0x7f074c9807c0>
2022-12-21 16:08:08,505 - lolbas.build - INFO - Using cached LOLBAS repository.
Traceback (most recent call last):
File "/opt/sec-vault-gen/generator.py", line 115, in <module>
util(**dargs)
File "/opt/sec-vault-gen/lib/utils/lolbas.py", line 149, in __call__
return Build.build(*args, **kwargs)
File "/opt/sec-vault-gen/lib/utils/lolbas.py", line 83, in build
categories = list(set([c['Category'] for c in fm['Commands']]))
KeyError: 'Commands'
After checking the variable "fm" it seems that the "FM.read" is not parsing the YML file. But the path to the YML file is correct.
# ====================
# GET FRONTMATTER DATA
# ====================
for infile in d.glob('*.yml'):
with infile.open() as i:
fm = FM.read(i)
# =============================
# ORGANIZE COMMANDS BY CATEGORY
# =============================
categories = list(set([c['Category'] for c in fm['Commands']]))
commands_by_category = {}
for cat in categories:
commands_by_category[cat] = [
c for c in fm['Commands'] if c['Category'] == cat
]
Before I debug further, maybe you have an idea or have you had the same issue once?
Python Version: 3.10.9
Thanks
The text was updated successfully, but these errors were encountered:
Thanks for creating and publishing the script.
When running the second command to create the LOLBAS md files I get the following error:
After checking the variable "fm" it seems that the "FM.read" is not parsing the YML file. But the path to the YML file is correct.
Before I debug further, maybe you have an idea or have you had the same issue once?
Python Version: 3.10.9
Thanks
The text was updated successfully, but these errors were encountered: