From 10db5f22b7a538ef018955d12171baf45e220b6d Mon Sep 17 00:00:00 2001 From: Charley Wu Date: Wed, 4 Jan 2023 23:14:40 +0800 Subject: [PATCH 1/3] Clean up translations --- SecureAuditor.ps1 | 2 -- zh-TW/SecureAuditor.psd1 | 2 -- 2 files changed, 4 deletions(-) diff --git a/SecureAuditor.ps1 b/SecureAuditor.ps1 index b108f9c..384d487 100644 --- a/SecureAuditor.ps1 +++ b/SecureAuditor.ps1 @@ -9,8 +9,6 @@ Import-Module ([IO.Path]::Combine($PSScriptRoot, 'SecureAuditor.psm1')) -Force $i18n = Data { # culture="en-US" ConvertFrom-StringData @' - Match = match - NotMatch = not match SystemInfo = System Information Error = Error '@ diff --git a/zh-TW/SecureAuditor.psd1 b/zh-TW/SecureAuditor.psd1 index 20cffa8..8919369 100644 --- a/zh-TW/SecureAuditor.psd1 +++ b/zh-TW/SecureAuditor.psd1 @@ -1,8 +1,6 @@ # culture="zh-TW" ConvertFrom-StringData -StringData @' RequireAdministrator = 需要管理者權限 -Match = 符合 -NotMatch = 不符合 SkipRule = 略過規則 SystemInfo = 系統資訊 Error = 錯誤 From 2a95902c212ffcf18c9d3de545f158c345af1906 Mon Sep 17 00:00:00 2001 From: Charley Wu Date: Wed, 4 Jan 2023 23:16:02 +0800 Subject: [PATCH 2/3] Rename function from `Write-RequireAdministrators` to `Write-RequireAdministrator` --- SecureAuditor.psd1 | 2 +- SecureAuditor.psm1 | 2 +- rules/EventLogs.psm1 | 2 +- rules/Login.psm1 | 2 +- rules/PasswordPolicy.psm1 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/SecureAuditor.psd1 b/SecureAuditor.psd1 index 4fd3c3c..0e19d8d 100644 --- a/SecureAuditor.psd1 +++ b/SecureAuditor.psd1 @@ -63,7 +63,7 @@ # NestedModules = @() # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. - FunctionsToExport = @('Get-IniContent', 'IsLocalAdministrator', 'Write-CheckList', 'Write-RequireAdministrators') + FunctionsToExport = @('Get-IniContent', 'IsLocalAdministrator', 'Write-CheckList', 'Write-RequireAdministrator') # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = @() diff --git a/SecureAuditor.psm1 b/SecureAuditor.psm1 index 71524cc..02b39b5 100644 --- a/SecureAuditor.psm1 +++ b/SecureAuditor.psm1 @@ -45,7 +45,7 @@ function IsLocalAdministrator() { return $false; } -function Write-RequireAdministrators($ruleName) { +function Write-RequireAdministrator($ruleName) { Write-Host "`n> $($i18n.SkipRule): $($ruleName) ($($i18n.RequireAdministrator)) ..." } diff --git a/rules/EventLogs.psm1 b/rules/EventLogs.psm1 index eda8a23..cdcc791 100644 --- a/rules/EventLogs.psm1 +++ b/rules/EventLogs.psm1 @@ -17,7 +17,7 @@ if ($PSUICulture -ne 'en-US') { function Test($config) { if (-not (IsLocalAdministrator)) { $ruleName = [System.IO.Path]::GetFileNameWithoutExtension($PSCommandPath) - Write-RequireAdministrators($ruleName) + Write-RequireAdministrator($ruleName) return } $logNames = $config.EventLogs.LogNames -split ',\s*' diff --git a/rules/Login.psm1 b/rules/Login.psm1 index 0d797f1..5aa6207 100644 --- a/rules/Login.psm1 +++ b/rules/Login.psm1 @@ -17,7 +17,7 @@ if ($PSUICulture -ne 'en-US') { function Test($config) { if (-not (IsLocalAdministrator)) { $ruleName = [System.IO.Path]::GetFileNameWithoutExtension($PSCommandPath) - Write-RequireAdministrators($ruleName) + Write-RequireAdministrator($ruleName) return } $days = [int]::Parse($config.Login.Days) * -1 diff --git a/rules/PasswordPolicy.psm1 b/rules/PasswordPolicy.psm1 index 7ce4c54..79f1248 100644 --- a/rules/PasswordPolicy.psm1 +++ b/rules/PasswordPolicy.psm1 @@ -16,7 +16,7 @@ if ($PSUICulture -ne 'en-US') { function Test($config) { if (-not (IsLocalAdministrator)) { $ruleName = [System.IO.Path]::GetFileNameWithoutExtension($PSCommandPath) - Write-RequireAdministrators($ruleName) + Write-RequireAdministrator($ruleName) return } # https://learn.microsoft.com/windows-server/administration/windows-commands/secedit-export From 329bc21524aff9afdd6a7729ed6bf4596e36b9bc Mon Sep 17 00:00:00 2001 From: Charley Wu Date: Wed, 4 Jan 2023 23:16:42 +0800 Subject: [PATCH 3/3] Bump version to 0.0.5 --- README.md | 2 +- README.zh-TW.md | 2 +- SecureAuditor.psd1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f0638c1..d38f3a1 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Sample output ````markdown -# Windows Secure Auditor: 0.0.4 +# Windows Secure Auditor: 0.0.5 ## System Information diff --git a/README.zh-TW.md b/README.zh-TW.md index c213b87..610a0ab 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -30,7 +30,7 @@ 範例輸出 ````markdown -# Windows Secure Auditor: 0.0.4 +# Windows Secure Auditor: 0.0.5 ## 系統資訊 diff --git a/SecureAuditor.psd1 b/SecureAuditor.psd1 index 0e19d8d..6a18ceb 100644 --- a/SecureAuditor.psd1 +++ b/SecureAuditor.psd1 @@ -6,7 +6,7 @@ # RootModule = '' # Version number of this module. - ModuleVersion = '0.0.4' + ModuleVersion = '0.0.5' # Supported PSEditions # CompatiblePSEditions = @()