Minor adjustments to be yaml compliant

This commit is contained in:
Oddvar Moe
2018-09-24 23:18:00 +02:00
parent 37cc1ee83e
commit f8fec9849b
12 changed files with 60 additions and 55 deletions

View File

@@ -29,16 +29,16 @@ function Convert-YamlToMD
"name: $($YamlObject.Name)"| Add-Content $Outfile
"description: $($YamlObject.Description)"| Add-Content $Outfile
"function:"| Add-Content $Outfile
# Need a category linked to the different things... Execute, Download, AWL-bypass.
foreach($cmd in $YamlObject.Commands)
{
" $($cmd.Category):"| Add-Content $Outfile
" - description: $($cmd.Description)"| Add-Content $Outfile
" code: $($cmd.Command)"| Add-Content $Outfile
" code: $($cmd.Command)"| Add-Content $Outfile
" mitreid: $($cmd.MitreID)"| Add-Content $Outfile
" mitrelink: $($cmd.MitreLink)"| Add-Content $Outfile
" operatingsystem: $($cmd.Operatingsystem)"| Add-Content $Outfile
" privileges: $($cmd.Privileges)"| Add-Content $Outfile
}
"resources:"| Add-Content $Outfile
foreach($link in $YamlObject.Resources)
@@ -48,9 +48,14 @@ function Convert-YamlToMD
"fullpath:"| Add-Content $Outfile
foreach($path in $YamlObject.'Full path')
{
" - path: $($path)"| Add-Content $Outfile
" - Path: $($path)"| Add-Content $Outfile
}
"acknowledgement:"| Add-Content $Outfile
foreach($pers in $YamlObject.Acknowledgement)
{
" - Person: $($pers.Person)"| Add-Content $Outfile
" Handle: `'$($pers.Handle)`'"| Add-Content $Outfile
}
"notes: $($YamlObject.Notes)"| Add-Content $Outfile
"---" | Add-Content $Outfile
}
End
@@ -112,11 +117,11 @@ function Invoke-GenerateMD
#Generate the stuff!
#Bins
#Invoke-GenerateMD -YmlPath "$mainpath\yml\OSBinaries" -Outpath "c:\tamp\Binaries" -Verbose
##Invoke-GenerateMD -YmlPath "$mainpath\yml\OSBinaries" -Outpath "c:\tamp\Binaries" -Verbose
Invoke-GenerateMD -YmlPath "$mainpath\yml\OtherMSBinaries" -Outpath "c:\tamp\OtherMSBinaries" -Verbose
##Scripts
#Invoke-GenerateMD -YmlPath "$mainpath\yml\OSScripts" -Outpath "c:\tamp\SCripts" -Verbose
##Invoke-GenerateMD -YmlPath "$mainpath\yml\OSScripts" -Outpath "c:\tamp\Scripts" -Verbose
##Libs
#Invoke-GenerateMD -YmlPath "$mainpath\yml\OSLibraries" -Outpath "c:\tamp\Libraries" -Verbose
##Invoke-GenerateMD -YmlPath "$mainpath\yml\OSLibraries" -Outpath "c:\tamp\Libraries" -Verbose