Skip to content

Commit

Permalink
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions lib/init.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/init.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/init.ts
@@ -115,6 +115,7 @@ export async function injectWindowsTracer(
$id = $p[0].ParentProcessId
}
}
Write-Host "Final process: $p"
Invoke-Expression "&$tracer --inject=$id"`;
} else {
@@ -134,9 +135,9 @@ export async function injectWindowsTracer(
)
$id = $PID
for ($i = 0; $i -lt ${processLevel}; $i++) {
for ($i = 0; $i -le ${processLevel}; $i++) {
$p = Get-CimInstance -Class Win32_Process -Filter "ProcessId = $id"
Write-Host "Found process: $p"
Write-Host "Parent process \${i}: $p"
if ($p -eq $null) {
throw "Process tree ended before reaching required level"
}
@@ -149,6 +150,7 @@ export async function injectWindowsTracer(
$id = $p[0].ParentProcessId
}
}
Write-Host "Final process: $p"
Invoke-Expression "&$tracer --inject=$id"`;
}

0 comments on commit 7d9c81f

Please sign in to comment.