We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af103ec commit 01d80caCopy full SHA for 01d80ca
UAC-TokenMagic.ps1
@@ -253,10 +253,11 @@ function UAC-TokenMagic {
253
# We don't actually check if the process is elevated, be smart
254
# QueryLimitedInformation = 0x1000
255
$hProcess = [UACTokenMagic]::OpenProcess(0x00001000,$false,$ProcPID)
256
- if ($hProcess) {
+ if ($hProcess -ne 0) {
257
echo "[*] Successfully acquired $((Get-Process -Id $ProcPID).Name) handle"
258
} else {
259
echo "[!] Failed to get process token!`n"
260
+ Break
261
}
262
263
# Prepare ShellExecuteEx
0 commit comments