From ace722075281756ceb4a08cd6493d3cdb377e97a Mon Sep 17 00:00:00 2001 From: PTah Date: Mon, 4 May 2026 09:11:03 +1000 Subject: [PATCH] feat: log ignore.lst reload with rule counts --- Login_Monitor.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Login_Monitor.ps1 b/Login_Monitor.ps1 index 1c7087f..25c2503 100644 --- a/Login_Monitor.ps1 +++ b/Login_Monitor.ps1 @@ -1172,6 +1172,17 @@ function Get-RdpMonitorIgnoreListEntries { } $script:IgnoreListCache = @($entries) $script:IgnoreListCacheStampUtc = $stamp + $arr = $script:IgnoreListCache + $nIp = @($arr | Where-Object { $_.Kind -eq 'Ip' }).Count + $nUser = @($arr | Where-Object { $_.Kind -eq 'User' }).Count + $nWks = @($arr | Where-Object { $_.Kind -eq 'Workstation' }).Count + $nAny = @($arr | Where-Object { $_.Kind -eq 'Any' }).Count + $nTotal = $arr.Count + if ($nTotal -eq 0) { + Write-Log "ignore.lst обновлён: список правил пуст, игнорирование по файлу для Security 4624/4625 не задаётся." + } else { + Write-Log ("ignore.lst обновлён: добавлено игнорирование событий 4624/4625 по IP ({0}), пользователю ({1}), рабочей станции ({2}); универсальных правил ({3}). Всего записей: {4}." -f $nIp, $nUser, $nWks, $nAny, $nTotal) + } return $script:IgnoreListCache } catch { Write-Log "Предупреждение: не удалось прочитать ignore.lst: $($_.Exception.Message)"