mirror of
https://github.com/Yamato-Security/WELA.git
synced 2025-12-19 07:23:07 +01:00
feat: add currentsetting
This commit is contained in:
4
WELA.ps1
4
WELA.ps1
@@ -66,9 +66,9 @@ class WELA {
|
|||||||
[void] Output([string] $Format) {
|
[void] Output([string] $Format) {
|
||||||
switch ($Format.ToLower()) {
|
switch ($Format.ToLower()) {
|
||||||
"std" {
|
"std" {
|
||||||
$color = if ($this.Enabled) { "Green" } else { "Red" }
|
$color = if ($this.CurrentSetting -eq "Enabled") { "Green" } else { "Red" }
|
||||||
$ruleCounts = ""
|
$ruleCounts = ""
|
||||||
$logEnabled = if ($this.Enabled) { "Enabled" } else { "Disabled" }
|
$logEnabled = $this.CurrentSetting
|
||||||
$allZero = $this.RulesCount.Values | Where-Object { $_ -ne 0 } | Measure-Object | Select-Object -ExpandProperty Count
|
$allZero = $this.RulesCount.Values | Where-Object { $_ -ne 0 } | Measure-Object | Select-Object -ExpandProperty Count
|
||||||
if ($allZero -eq 0) {
|
if ($allZero -eq 0) {
|
||||||
$ruleCounts = "(no rules)"
|
$ruleCounts = "(no rules)"
|
||||||
|
|||||||
Reference in New Issue
Block a user