Skip to content

Instantly share code, notes, and snippets.

@ylmrx
Created January 21, 2026 09:29
Show Gist options
  • Select an option

  • Save ylmrx/d74b3dc05db2fe032087de87f783060e to your computer and use it in GitHub Desktop.

Select an option

Save ylmrx/d74b3dc05db2fe032087de87f783060e to your computer and use it in GitHub Desktop.
Stop feeding the inject-feeder
# Check if already running as admin
if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
# Relaunch the script with admin rights
Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs
exit
}
$process = Get-Process -Name "inject-feeder" -ErrorAction SilentlyContinue
if ($process) {
$processId = $process.Id
$hp = "D:\Users_Directory\yoann\Downloads\Handle\handle.exe"
$handles = & $hp -p $processId | Where-Object { $_ -match '^\s+\w{4}:.*$' -and $_ -match [regex]::Escape("D:\Users_Directory\yoann\Documents") }
foreach ($handle in $handles) {
$handleValue = ($handle -split ':')[0]
if ($handleValue) {
& $hp -c $handleValue -p $ProcessId -y
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment