From d58bc09431f04c0159002642d50b3e64672601de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ege=20Balc=C4=B1?= Date: Wed, 29 Jul 2020 12:16:46 +0300 Subject: [PATCH] v1.0 stable release --- .gitignore | 23 +++++++++++++++++++++++ Dockerfile | 20 ++++++++++++++++++++ Makefile | 4 +++- README.md | 11 +++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index c8e23a2..1488fde 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,24 @@ +# Created by .ignore support plugin (hsz.mobi) +### Go template +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib +*.txt + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +.idea + +# Builds +build/ sgn diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f025646 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM ubuntu:18.04 +RUN apt-get update && apt-get -y install wget git cmake build-essential libcapstone-dev gcc-multilib g++-multilib python3 time +WORKDIR /root/ +RUN git clone https://github.com/EgeBalci/keystone +RUN mkdir keystone/build +WORKDIR /root/keystone/build +RUN ../make-share.sh +RUN cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DLLVM_TARGETS_TO_BUILD="AArch64;X86" -G "Unix Makefiles" .. +RUN make -j8 +#RUN ../make-lib.sh +#RUN cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DLLVM_TARGETS_TO_BUILD="AArch64, X86" -G "Unix Makefiles" .. +#RUN make -j8 +RUN wget https://golang.org/dl/go1.14.6.linux-amd64.tar.gz +RUN tar -C /usr/local -xzf go1.14.6.linux-amd64.tar.gz +ENV PATH=$PATH:/usr/local/go/bin +RUN make install +RUN ldconfig +ENV GOPATH=/root +RUN go get -v -u github.com/egebalci/sgn +ENTRYPOINT ["/root/bin/sgn"] diff --git a/Makefile b/Makefile index e48de34..ed95cb5 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,4 @@ normal: - go build -ldflags="-s -w" -o sgn + go build -ldflags="-s -w" -trimpath -o sgn +386: + CGO_ENABLED=1 GOARCH=386 go build -ldflags="-s -w" -trimpath -o sgn diff --git a/README.md b/README.md index 38fd32a..fbce77d 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ For offensive security community, the original implementation of shikata ga nai ## Install +You can get the pre-compiled binaries [HERE](https://github.com/EgeBalci/sgn/releases). For building from source follow the steps bellow. + **Dependencies:** Only dependencies required is keystone and capstone libraries. For easily installing capstone and keystone libararies check the table below; @@ -60,6 +62,15 @@ Then just go get it ツ go get github.com/egebalci/sgn ``` +***DOCKER INSTALL*** + +[![Docker](http://dockeri.co/image/egee/sgn)](https://hub.docker.com/r/egee/sgn/) + +``` +docker pull egee/amber +docker run -it egee/amber +``` + **Usage** `-h` is pretty self explanatory use `-v` if you want to see what's going on behind the scenes `( ͡° ͜ʖ ͡°)_/¯`