feat(hayabusa): add auto-case scoring and 6h automation

This commit is contained in:
igor04091968
2026-05-21 20:47:49 +03:00
parent 4e4898828b
commit 0c88b519ee
22 changed files with 757 additions and 32 deletions
+8 -2
View File
@@ -4,6 +4,7 @@ param(
[string]$OutputRoot,
[int]$RetentionDays,
[string[]]$Channels,
[Nullable[int]]$HoursBack,
[int]$DaysBack = 3,
[switch]$NoZip
)
@@ -78,8 +79,12 @@ $zipPath = Join-Path $effectiveOutputRoot "$hostName-$timestamp.zip"
New-Directory -Path $batchRoot
New-Directory -Path $evtxRoot
$daysBackMs = [int64]$DaysBack * 24 * 60 * 60 * 1000
$query = "*[System[TimeCreated[timediff(@SystemTime) <= $daysBackMs]]]"
$lookbackMs = if ($null -ne $HoursBack) {
[int64]$HoursBack * 60 * 60 * 1000
} else {
[int64]$DaysBack * 24 * 60 * 60 * 1000
}
$query = "*[System[TimeCreated[timediff(@SystemTime) <= $lookbackMs]]]"
$results = @()
foreach ($channel in @($effectiveChannels | Where-Object { -not [string]::IsNullOrWhiteSpace([string]$_) })) {
@@ -117,6 +122,7 @@ $manifest = [ordered]@{
batchRoot = $batchRoot
zipPath = if ($NoZip) { $null } else { $zipPath }
daysBack = $DaysBack
hoursBack = if ($null -ne $HoursBack) { [int]$HoursBack } else { $null }
retentionDays = $effectiveRetentionDays
channels = @($effectiveChannels)
exports = @($results)