-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (38 loc) · 1.11 KB
/
Makefile
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
.PHONY: build test
build: --prep-dnsexfiltool-config --build-dnsexfiltool --build-dnsreceiver
test: --prep-dnsexfiltool-config --test-shared --test-dnsexfiltool --test-dnsreceiver
--prep-dnsexfiltool-config:
@if [ ! -f "./dns_exfil_tool/config/config.toml" ]; then \
cp ./dns_exfil_tool/config/config.toml.example ./dns_exfil_tool/config/config.toml; \
fi
--build-dnsexfiltool:
@if [ ! -f "./dns_exfil_tool/config/config.toml" ]; then exit 1; fi
@echo "Building DNS exfil tool..."
@cd dns_exfil_tool; \
go build -o ./bin/det ./main.go; \
echo "Built to ./dns_exfil_tool/bin/det"; \
echo "\n\n";
--build-dnsreceiver:
@echo "Building DNS receiver..."
@cd dns_receiver; \
go build -o ./bin/dnsreceiver ./main.go; \
echo "Built to ./dns_receiver/bin/dnsreceiver"; \
echo "\n\n";
--test-shared:
@cd ./shared; \
go fmt ./...; \
go build ./...; \
go test -v ./...; \
echo "\n\n";
--test-dnsexfiltool:
@cd ./dns_exfil_tool; \
go fmt ./...; \
go build ./...; \
go test -v ./...; \
echo "\n\n";
--test-dnsreceiver:
@cd ./dns_receiver; \
go fmt ./...; \
go build ./...; \
go test -v ./...; \
echo "\n\n";