-
Notifications
You must be signed in to change notification settings - Fork 130
/
buildBinariesLinux.sh
executable file
·55 lines (45 loc) · 1.74 KB
/
buildBinariesLinux.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
version=1.3.0
# Windows amd64
goos=windows
goarch=amd64
GOOS=$goos GOARCH=$goarch go build -o wcvs.exe
zip build/web-cache-vulnerability-scanner_"$version"_"$goos"_"$goarch".zip wcvs.exe wordlists/headers wordlists/parameters
# Linux amd64
goos=linux
goarch=amd64
GOOS=$goos GOARCH=$goarch go build -o wcvs
tar cfvz build/web-cache-vulnerability-scanner_"$version"_"$goos"_"$goarch".tar.gz wcvs wordlists/headers wordlists/parameters
# Linux arm64
goos=linux
goarch=arm64
GOOS=$goos GOARCH=$goarch go build -o wcvs
tar cfvz build/web-cache-vulnerability-scanner_"$version"_"$goos"_"$goarch".tar.gz wcvs wordlists/headers wordlists/parameters
# Darwin/MacOS amd64
goos=darwin
goarch=amd64
GOOS=$goos GOARCH=$goarch go build -o wcvs
tar cfvz build/web-cache-vulnerability-scanner_"$version"_"$goos"_"$goarch".tar.gz wcvs wordlists/headers wordlists/parameters
# Darwin/MacOS arm64
goos=darwin
goarch=arm64
GOOS=$goos GOARCH=$goarch go build -o wcvs
tar cfvz build/web-cache-vulnerability-scanner_"$version"_"$goos"_"$goarch".tar.gz wcvs wordlists/headers wordlists/parameters
# FreeBSD amd64
goos=freebsd
goarch=amd64
GOOS=$goos GOARCH=$goarch go build -o wcvs
tar cfvz build/web-cache-vulnerability-scanner_"$version"_"$goos"_"$goarch".tar.gz wcvs wordlists/headers wordlists/parameters
# OpenBSD amd64
goos=openbsd
goarch=amd64
GOOS=$goos GOARCH=$goarch go build -o wcvs
tar cfvz build/web-cache-vulnerability-scanner_"$version"_"$goos"_"$goarch".tar.gz wcvs wordlists/headers wordlists/parameters
# reset GOOS and GOARCH
set GOOS=
set GOARCH=
# remove wcvs
rm wcvs
rm wcvs.exe
# generate checksum file
find build/ -type f \( -iname "*.tar.gz" -or -iname "*.zip" \) -exec sha256sum {} + > build/web-cache-vulnerability-scanner_"$version"_checksums_sha256.txt