-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61fa188
commit c8898f2
Showing
1 changed file
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
export GOOS=linux | ||
go build && mv GoReSym GoReSym_lin | ||
export GOOS=windows | ||
go build && mv GoReSym.exe GoReSym_win.exe | ||
export GOOS=darwin | ||
go build && mv GoReSym GoReSym_mac | ||
export GOOS=linux | ||
wget https://github.com/VirusTotal/yara/archive/refs/tags/v4.3.1.tar.gz | ||
tar -zxf v4.3.1.tar.gz && cd yara-4.3.1 | ||
|
||
sudo apt-get install automake libtool make gcc pkg-config mingw-w64 | ||
./bootstrap.sh && ./configure && make && sudo make install | ||
sudo ldconfig | ||
|
||
cd $OLDPWD | ||
|
||
GOOS=linux GOARCH=amd64 go build && mv GoReSym GoReSym_lin | ||
|
||
cd yara-4.3.1 | ||
YARA_SRC=$(pwd) | ||
|
||
make clean | ||
./configure --host=x86_64-w64-mingw32 --disable-magic --disable-cuckoo --without-crypto --prefix=${YARA_SRC}/x86_64-w64-mingw32 | ||
make -C ${YARA_SRC} | ||
sudo make -C ${YARA_SRC} install | ||
cd $OLDPWD | ||
|
||
go get -d -u github.com/hillu/go-yara/v4 | ||
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc PKG_CONFIG_PATH=${YARA_SRC}/x86_64-w64-mingw32/lib/pkgconfig go install -ldflags '-extldflags "-static"' github.com/hillu/go-yara/v4 | ||
GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc CGO_ENABLED=1 go build --ldflags '-extldflags "-lm -static"' && mv GoReSym.exe GoReSym_win64.exe | ||
|
||
sudo rm -rf yara-4.3.1 | ||
rm v4.3.1.tar.gz |