1 Star 0 Fork 2

yuluodejijie / Stowaway

forked from sh3llsas / Stowaway 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build_agent.sh 1.78 KB
一键复制 编辑 原始数据 按行查看 历史
ph4ntom 提交于 2021-04-26 18:05 . V2.0
echo "Building Stowaway(agent)....."
CGO_ENABLED=0 GOOS=linux GOARCH=386 go build -trimpath -ldflags="-w -s" -o release/linux_x86_agent agent/agent.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-w -s" -o release/linux_x64_agent agent/agent.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-w -s" -o release/windows_x64_agent.exe agent/agent.go
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -trimpath -ldflags="-w -s" -o release/windows_x86_agent.exe agent/agent.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags="-w -s" -o release/macos_agent agent/agent.go
CGO_ENABLED=0 GOOS=linux GOARCH=arm GOARM=5 go build -trimpath -ldflags="-w -s" -o release/arm_eabi5_agent agent/agent.go
CGO_ENABLED=0 GOOS=linux GOARCH=mipsle go build -trimpath -ldflags="-w -s" -o release/mipsel_agent agent/agent.go
# Here is a special situation that i have to mention it here
# You can see Stowaway get the params passed by the user through console by default
# But if you define the params in the program(instead of passing them by the console),you can just run Stowaway agent by double-click
# Sounds great? Right?
# But it is slightly weird on Windows since double-clicking Stowaway agent or entering "shell" command in Stowaway admin will spawn a cmd window
# That makes Stowaway pretty hard to hide itself
# To solve this,here is my solution
# First, see the detail in "agent/shell.go", follow my instruction and change some codes
# Then,compile Stowaway(Windows platform) solo by using the following two sentences and get your bonus!
#CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -ldflags="-w -s -H=windowsgui" -o windows_x64_agent.exe
#CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -trimpath -ldflags="-w -s -H=windowsgui" -o windows_x86_agent.exe
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yuluodejijie/Stowaway.git
git@gitee.com:yuluodejijie/Stowaway.git
yuluodejijie
Stowaway
Stowaway
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891