INNER CODE UNIT · C#
Program
ghostvectoracademy/DLLHijackHunter · src/DLLHijackHunter/Program.cs:15
public class Program
{
public static async Task<int> Main(string[] args)
{
// Hidden child mode for --verify-load: resolve one DLL name with a writable directory added
// to the search path and print where the real loader resolved it. Must run before any
// banner/scan setup. Output is a single token on stdout consumed by the parent.
if (args.Length >= 3 && args[0] == "--resolve-probe")
return LoadProbe.RunChild(args[1], args[2],
traditional: args.Length > 3 && args[3] == "traditional");
// Prevent accidental scan freezes from the legacy console's QuickEdit Mode:
// a stray click in the window would otherwise put it into mark/select mode and
// block stdout, stalling a long scan until a key is pressed. Disabled for the run;
// the original console mode is restored on exit. See Native/ConsoleQuickEdit.cs.
var quickEditGuard = Native.ConsoleQuickEdit.Disable();
AppDomain.CurrentDomain.ProcessExit += (_, _) => quickEditGuard.Dispose();