-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sh
29 lines (25 loc) · 1.69 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
export LDFLAGS='-s -w '
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$LDFLAGS" -trimpath -o Hikvision_Info_Leak_linux_amd64 main.go
CGO_ENABLED=0 GOOS=windows GOARCH=386 go build -ldflags="$LDFLAGS" -trimpath -o Hikvision_Info_Leak_windows_386.exe main.go
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="$LDFLAGS" -trimpath -o Hikvision_Info_Leak_windows_amd64.exe main.go
CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -ldflags="$LDFLAGS" -trimpath -o Hikvision_Info_Leak_windows_arm64.exe main.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="$LDFLAGS" -trimpath -o Hikvision_Info_Leak_darwin_amd64 main.go
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags="$LDFLAGS" -trimpath -o Hikvision_Info_Leak_darwin_arm64 main.go
upx -9 Hikvision_Info_Leak_linux_amd64
upx -9 Hikvision_Info_Leak_windows_386.exe
upx -9 Hikvision_Info_Leak_windows_amd64.exe
upx -9 Hikvision_Info_Leak_windows_arm64.exe
upx -9 Hikvision_Info_Leak_darwin_amd64
upx -9 Hikvision_Info_Leak_darwin_arm64
zip Hikvision_Info_Leak_linux_amd64.zip Hikvision_Info_Leak_linux_amd64
zip Hikvision_Info_Leak_windows_386.zip Hikvision_Info_Leak_windows_386.exe
zip Hikvision_Info_Leak_windows_amd64.zip Hikvision_Info_Leak_windows_amd64.exe
zip Hikvision_Info_Leak_windows_arm64.zip Hikvision_Info_Leak_windows_arm64.exe
zip Hikvision_Info_Leak_darwin_amd64.zip Hikvision_Info_Leak_darwin_amd64
zip Hikvision_Info_Leak_darwin_arm64.zip Hikvision_Info_Leak_darwin_arm64
rm -f Hikvision_Info_Leak_linux_amd64
rm -f Hikvision_Info_Leak_windows_386.exe
rm -f Hikvision_Info_Leak_windows_amd64.exe
rm -f Hikvision_Info_Leak_windows_arm64.exe
rm -f Hikvision_Info_Leak_darwin_amd64
rm -f Hikvision_Info_Leak_darwin_arm64