From 94d48406f9fb7a7c80c984e981dfac3a0fa31c92 Mon Sep 17 00:00:00 2001 From: winds0r Date: Wed, 6 Dec 2023 23:52:52 +0100 Subject: [PATCH] fix(cli): compiling as `exe` does not set the correct env values --- cli/parser.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/parser.go b/cli/parser.go index ff65849..cd56e3a 100644 --- a/cli/parser.go +++ b/cli/parser.go @@ -43,9 +43,9 @@ const ASCII_ART = ` ` func BuildLoader(opts *Options) *exec.Cmd { + os.Setenv("GOOS", opts.OS) + os.Setenv("GOARCH", opts.Arch) if opts.BuildType == "dll" { - os.Setenv("GOOS", opts.OS) - os.Setenv("GOARCH", opts.Arch) os.Setenv("CGO_ENABLED", "1") os.Setenv("CC", "x86_64-w64-mingw32-gcc") fmt.Println("[*] Compiling payload as dll...")