Created
January 21, 2026 09:29
-
-
Save ylmrx/d74b3dc05db2fe032087de87f783060e to your computer and use it in GitHub Desktop.
Stop feeding the inject-feeder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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