mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-06 17:22:50 +01:00
chg: Output horizontally
This commit is contained in:
4
WELA.ps1
4
WELA.ps1
@@ -204,7 +204,7 @@ $pwsScrEnabled = CheckRegistryValue -registryPath "HKLM:\SOFTWARE\Wow6432Node\Po
|
|||||||
$pwsModStatus = if ($pwsModEnabled) { "Enabled" } else { "Disabled" }
|
$pwsModStatus = if ($pwsModEnabled) { "Enabled" } else { "Disabled" }
|
||||||
$pwsSrcStatus = if ($pwsScrEnabled) { "Enabled" } else { "Disabled" }
|
$pwsSrcStatus = if ($pwsScrEnabled) { "Enabled" } else { "Disabled" }
|
||||||
|
|
||||||
# 123 / 1860 (6%)
|
# Step 7: Calculate the total usable rate
|
||||||
$totalUsableSecRate = CalculateTotalUsableRate -usableRate $usableSecRate
|
$totalUsableSecRate = CalculateTotalUsableRate -usableRate $usableSecRate
|
||||||
$totalUsablePwsClaRate = CalculateTotalUsableRate -usableRate $usablePwsClaRate
|
$totalUsablePwsClaRate = CalculateTotalUsableRate -usableRate $usablePwsClaRate
|
||||||
$totalUsablePwsModRate = CalculateTotalUsableRate -usableRate $usablePwsModRate
|
$totalUsablePwsModRate = CalculateTotalUsableRate -usableRate $usablePwsModRate
|
||||||
@@ -223,6 +223,6 @@ $totalRulesCount = ($totalCounts | Measure-Object -Property Count -Sum).Sum
|
|||||||
$utilizationPercentage = "{0:N2}" -f (($totalUsable / $totalRulesCount) * 100)
|
$utilizationPercentage = "{0:N2}" -f (($totalUsable / $totalRulesCount) * 100)
|
||||||
Write-Output "You can utilize $utilizationPercentage% of your detection rules."
|
Write-Output "You can utilize $utilizationPercentage% of your detection rules."
|
||||||
|
|
||||||
# Step 7: Save the lists of usable and unusable rules to CSV files
|
# Step 8: Save the lists of usable and unusable rules to CSV files
|
||||||
$usableSecRules | Select-Object title, level, id | Export-Csv -Path "UsableRules.csv" -NoTypeInformation
|
$usableSecRules | Select-Object title, level, id | Export-Csv -Path "UsableRules.csv" -NoTypeInformation
|
||||||
$unusableRules | Select-Object title, level, id | Export-Csv -Path "UnusableRules.csv" -NoTypeInformation
|
$unusableRules | Select-Object title, level, id | Export-Csv -Path "UnusableRules.csv" -NoTypeInformation
|
||||||
|
|||||||
Reference in New Issue
Block a user