mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-08 18:22:50 +01:00
chg: Output horizontally
This commit is contained in:
9
WELA.ps1
9
WELA.ps1
@@ -95,10 +95,15 @@ function ShowRulesCountsByLevel {
|
|||||||
"low" = "Green"
|
"low" = "Green"
|
||||||
"informational" = "White" # Assuming a default color for informational
|
"informational" = "White" # Assuming a default color for informational
|
||||||
}
|
}
|
||||||
|
$i = 0
|
||||||
$usableRate | Sort-Object { $levelColorMap.Keys.IndexOf($_.Level) } | ForEach-Object {
|
$usableRate | Sort-Object { $levelColorMap.Keys.IndexOf($_.Level) } | ForEach-Object {
|
||||||
$color = $levelColorMap[$_.Level]
|
$color = $levelColorMap[$_.Level]
|
||||||
Write-Host "$($_.Level) rules: $($_.UsableCount) / $($_.TotalCount) ($($_.Percentage)%)" -ForegroundColor $color
|
Write-Host -NoNewline "$($_.Level) rules: $($_.UsableCount) / $($_.TotalCount) ($($_.Percentage)%)" -ForegroundColor $color
|
||||||
|
if ($i -lt $levelColorMap.Count - 1)
|
||||||
|
{
|
||||||
|
Write-Host -NoNewline ", "
|
||||||
|
}
|
||||||
|
$i++
|
||||||
}
|
}
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
Write-Output ""
|
Write-Output ""
|
||||||
|
|||||||
Reference in New Issue
Block a user