From cb03046e8b8d59c67f350182cabf8be710c3338f Mon Sep 17 00:00:00 2001 From: brompwnie Date: Fri, 20 Sep 2019 14:47:05 +0100 Subject: [PATCH] adding example cfg.yml --- Makefile | 80 +++++++++++++++++++++++++++++++++----------------------- cfg.yml | 8 ++++++ 2 files changed, 55 insertions(+), 33 deletions(-) create mode 100644 cfg.yml diff --git a/Makefile b/Makefile index ec67f46..2db9983 100644 --- a/Makefile +++ b/Makefile @@ -1,33 +1,47 @@ -SHELL := /bin/bash -DIR := $(shell pwd) -BINARY_NAME := botb -OUTPUTDIR := ${DIR}/bin - -.PHONY: all build-linux clean - -GOV111PREFIX := -GOV111 := $(shell expr `go version | cut -f2 -d.` \>= 11) -ifeq "$(GOV111)" "" - GOV111PREFIX := env GO111MODULE=on -else - GOVERSION := $(shell expr `go version | cut -f2 -d.` \>= 11) - ifeq "$(GOVERSION)" "" - $(error must be running Go version 1.11 or newer, due to use of modules) - endif -endif - -all: clean build-linux - -clean: - @echo ">> removing previous builds" - @rm -rf $(OUTPUTDIR) - -$(GOPATH): - GOPATH := $(HOME)/go - -build-linux: - @echo ">> running check for unused/missing packages in go.mod" - @go mod tidy - @echo ">> building binary" - $(GOV111PREFIX) GOOS=linux GOARCH=amd64 go build -o $(OUTPUTDIR)/$(BINARY_NAME)-linux-amd64 ./ - \ No newline at end of file +# VERSION := $(shell cat ./VERSION) +IMAGE_NAME := golang:latest + +all: install binaries + +install: + go build . +test: + go test ./... -v + +image: + docker build . -t bob + +binaries: + gox -output="bin/{{.Dir}}_{{.OS}}_{{.Arch}}" -osarch="darwin/amd64 linux/386 linux/amd64" + +# vandocker: +# docker build -f vandockerfile -t vandocker . + +runvandocker: + docker run --rm -it -v /var/run/docker.sock:/tmp/thisisnotasocket.mock -v `pwd`:/app docker /bin/sh + +# run: +# docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock bob /bin/bash + +run: + docker run --rm -it -v `pwd`:/app -v /var/run/docker.sock:/var/meh bob /bin/bash + +runpriv: + docker run --rm --cap-add SYS_PTRACE -it -v `pwd`:/app -v /var/run/docker.sock:/var/meh bob /bin/bash + +runpid: + docker run -ti --rm --pids-limit="10" bob /bin/bash + +runclean: + docker run -it bob /bin/bash +runtest: + docker run -it --rm -v `pwd`/bob:/bob -v /var/run/docker.sock:/var/meh bob /app/main -path=/ -cicd=true && echo $? +# runtest2: +# docker run -it --rm --entrypoint "/bin/sh" ubuntu:latest +# runtest3: +# docker run -it --rm -v /var/run/docker.sock:/var/meh --entrypoint "/bin/sh" ubuntu:latest +# .PHONY: install test fmt release + + +docker run --rm -it -v /var/run/docker.sock:/tmp/thisisnotasocket.mock -v `pw +d`:/app -e DOCKER_HOST='/tmp/thisisnotasocket.mock' golang /bin/sh \ No newline at end of file diff --git a/cfg.yml b/cfg.yml new file mode 100644 index 0000000..d031d56 --- /dev/null +++ b/cfg.yml @@ -0,0 +1,8 @@ +payload: id +verbose: false +always-succeed: true +cicd: false +endpointlist: endpoints.txt +wordlist: wordlist.txt +path: / +mode: find-sockets \ No newline at end of file