This file contains 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
#!/bin/bash | |
dry=0 | |
if [[ $# -gt 0 && $1 == "-n" ]]; then | |
dry=1 | |
shift | |
fi | |
prefix="v" | |
if [[ $# -gt 0 ]]; then | |
if [[ $1 = -* || $# -gt 1 ]]; then |
This file contains 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
. $PSScriptRoot\Start-ProcessEx.ps1 | |
Add-Type -Namespace Runas -Name NativeMethods -UsingNamespace @( | |
'Microsoft.Win32.SafeHandles', | |
'System.ComponentModel', | |
'System.Security.Principal' | |
) -MemberDefinition @' | |
[DllImport("Advapi32.dll", EntryPoint = "DuplicateTokenEx", SetLastError = true)] | |
private static extern bool NativeDuplicateTokenEx( | |
SafeHandle hExistingToken, |
This file contains 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
import java.io.IOException; | |
import java.net.URLClassLoader; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.nio.file.Path; | |
/** | |
* Example demonstrating a ClassLoader leak. | |
* | |
* <p>To see it in action, copy this file to a temp directory somewhere, |