-
Notifications
You must be signed in to change notification settings - Fork 609
/
Makefile
56 lines (46 loc) · 1.38 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
47
48
49
50
51
52
53
54
55
# Makefile
# By Ron
#
# See LICENSE.md
# Can't use a '#' in the shell command
VERSION=$(shell egrep '^.define VERSION' client/dnscat.c | head -n1 | cut -d\" -f2)
OS=$(shell uname -s)
ARCH=$(shell uname -p | sed 's/x86_64/x64/i' | sed 's/i.86/x86/i')
ifeq ($(OS), Linux)
RELEASE_FILENAME="dnscat2-$(VERSION)-client-$(ARCH)"
else
RELEASE_FILENAME="dnscat2-$(VERSION)-client-$(OS)-$(ARCH)"
endif
all:
@cd client && $(MAKE)
@echo "Compile complete!"
@echo "* Client: client/dnscat"
@echo "* Server: server/dnscat_*.rb"
clean:
@cd client && $(MAKE) clean
debug:
@cd client && $(MAKE) debug
@echo "Debug compile complete!"
release:
@$(MAKE) clean
-mkdir dist/
@cd client && make release
@mv client/dnscat .
@strip dnscat
@tar -cvvjf dist/${RELEASE_FILENAME}.tar.bz2 dnscat
@echo "*** Release compiled: `pwd`/${RELEASE_FILENAME}"
@echo "*** By the way, did you update the version number in the server?"
@echo "Release compile complete!"
source_release:
@$(MAKE) clean
-mkdir dist/
@cp -r client dnscat2_client
@tar -cvvjf dist/dnscat2-${VERSION}-client-source.tar.bz2 dnscat2_client
@zip -r dist/dnscat2-${VERSION}-client-source.zip dnscat2_client
@rm -rf dnscat2_client
@cp -r server dnscat2_server
@tar -cvvjf dist/dnscat2-${VERSION}-server.tar.bz2 dnscat2_server
@zip -r dist/dnscat2-${VERSION}-server.zip dnscat2_server
@rm -rf dnscat2_server
dnscat:
@cd client && $(MAKE) dnscat