Files
reverse-skill/skills/ida-reverse/scripts/IdaOpenHelpers.ps1
Harry 0a4019d56f fix(router): clamp hot path to routing.json and real auth gate
Keep reverse-skill a skill router, not a platform. RULES hot path is master-route then case-init then PRIMARY. MASTER-ROUTING priority is verified against routing.json. precedent-auth no longer grants. CTF is one R41 pointer, not 40 competition routes. open.ps1 never deletes .i64/.idb. Route-scope parse is line-anchored and last-match. Tests: 168 routing cases, parse-contracts, title-safety in CI.
2026-08-18 14:58:22 +01:00

29 lines
956 B
PowerShell

# Shared IDA open lock policy. Never delete .i64/.idb.
function Get-IdaOpenLockPlan {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$BinaryPath
)
$dir = [System.IO.Path]::GetDirectoryName($BinaryPath)
$base = [System.IO.Path]::GetFileNameWithoutExtension($BinaryPath)
$lockExts = @('.id0', '.id1', '.id2', '.nam', '.til')
$dbExts = @('.i64', '.idb')
$hasLocked = $false
foreach ($ext in $lockExts) {
$f = Join-Path $dir ($base + $ext)
if (Test-Path -LiteralPath $f) { $hasLocked = $true }
}
$hasDatabase = $false
foreach ($ext in $dbExts) {
$f = Join-Path $dir ($base + $ext)
if (Test-Path -LiteralPath $f) { $hasDatabase = $true }
}
return [pscustomobject]@{
HasLocked = $hasLocked
HasDatabase = $hasDatabase
WouldDeleteDatabase = $false
PreferTempCopy = $hasLocked
}
}