diff --git a/Login_Monitor.ps1 b/Login_Monitor.ps1 index 1a38db2..c985ea3 100644 --- a/Login_Monitor.ps1 +++ b/Login_Monitor.ps1 @@ -82,7 +82,7 @@ $script:MonitorStopRequested = $false # строки ниже, если правки «мелкие» и вы не хотите менять отображаемую версию в логах). # Рекомендация: при значимых релизах меняйте и $ScriptVersion, и version.txt одинаково; при только # исправлениях на шаре — достаточно поднять patch в version.txt (например 1.3.0.1). -$ScriptVersion = "2.0.1-SAC" +$ScriptVersion = "2.0.2-SAC" # Логи (все под InstallRoot) $LogFile = Join-Path $script:InstallRoot "Logs\login_monitor.log" diff --git a/README.md b/README.md index 88d626c..c9c52c3 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ PowerShell-набор для мониторинга входов в Windows с - Документация по развёртыванию: **[Docs/README.md](Docs/README.md)** (RDP-монитор, Exchange, NETLOGON). - **`Encrypt-DpapiForRdpMonitor.ps1`** — опционально для подготовки DPAPI-строк токена/chat id и пароля SMTP (`$MailSmtpPasswordProtectedB64` в файле настроек). - **Локальные настройки RDP-монитора:** **`login_monitor.settings.ps1`** в каталоге установки (образец **`login_monitor.settings.example.ps1`**). При автообновлении **`Login_Monitor.ps1`** с шары файл настроек **не перезаписывается** (как **`exchange_monitor.settings.ps1`** для Exchange). -- **Security Alert Center (SAC):** модуль **`Sac-Client.ps1`** (копируется вместе с `Login_Monitor.ps1`). Режимы **`$UseSAC`**: `off` | `exclusive` | `dual` | `fallback` — контракт в репозитории **security-alert-center** (`docs/agent-integration.md`). Версия релиза: **`$ScriptVersion`** и **`version.txt`** (сейчас **2.0.1-SAC**); **`Sac-Client.ps1`** передаёт ту же версию в SAC (`product_version`). +- **Security Alert Center (SAC):** модуль **`Sac-Client.ps1`** (копируется вместе с `Login_Monitor.ps1`). Режимы **`$UseSAC`**: `off` | `exclusive` | `dual` | `fallback` — контракт в репозитории **security-alert-center** (`docs/agent-integration.md`). Версия релиза: **`$ScriptVersion`** и **`version.txt`** (сейчас **2.0.2-SAC**); **`Sac-Client.ps1`** передаёт ту же версию в SAC (`product_version`). ## Что изменилось (важное) diff --git a/Sac-Client.ps1 b/Sac-Client.ps1 index 522d939..8937381 100644 --- a/Sac-Client.ps1 +++ b/Sac-Client.ps1 @@ -173,9 +173,8 @@ function Convert-AnyToJsonSerializable { if ($Value -is [string] -or $Value -is [bool] -or $Value -is [char]) { return $Value } - if ($Value -is [byte] -or $Value -is [sbyte] -or $Value -is [int16] -or $Value -is [uint16] -or - $Value -is [int] -or $Value -is [uint] -or $Value -is [long] -or $Value -is [ulong] -or - $Value -is [float] -or $Value -is [double] -or $Value -is [decimal]) { + # PS 5.1: нет алиасов [uint]/[ulong] — IsPrimitive покрывает все числовые типы. + if ($Value.GetType().IsPrimitive) { return $Value } if ($Value -is [datetime] -or $Value -is [datetimeoffset] -or $Value -is [guid]) { diff --git a/version.txt b/version.txt index a6515ba..ac847e6 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.0.1-SAC +2.0.2-SAC