-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
94 lines (73 loc) · 2.88 KB
/
Makefile
File metadata and controls
94 lines (73 loc) · 2.88 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# This file is part of Skul.
#
# Copyright 2016, Simone Bossi <pyno@crypt.coffee>
# Hany Ragab <_hanyOne@crypt.coffee>
# Alexandro Calo' <ax@crypt.coffee>
# Copyright (C) 2014 Cryptcoffee. All rights reserved.
#
# Skull is a PoC to bruteforce the Cryptsetup implementation of
# Linux Unified Key Setup (LUKS).
#
# Skul is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
# Skul is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Skul. If not, see <http://www.gnu.org/licenses/>.
# debugging option for valgrind and gcc
DBG = -g -Xlinker -Map=output.map
# Compiling macros
CC = gcc
#OPT = -Wall -pedantic -ansi -Wno-pointer-sign -D _DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_REENTRANT -DPURIFY -O3 _BSD_SOURCE
OPT = -Wall -pedantic -std=c99 -Wno-pointer-sign -O3
COMP = $(CC) $(OPT)
COMPDBG = $(COMP) $(DBG)
# working directories
DIR = /tmp/skul/
LIB = lib/
BIN = bin/
SRC = src/
# openssl path
#OPENSSLI="./lib/openssl/include" # path to include dir
#OPENSSLL="./lib/openssl/lib" # path to lib dir
# dynamics linking options
#DLO = -ldl -lm -I${OPENSSLI} -L${OPENSSLL} -lcrypto -lssl -lpthread -pthread
DLO = -ldl -lm -lssl -lcrypto -lpthread -pthread
OBJS= alloclib.o skulfs.o utils.o decrypt.o random.o af.o config.o thread.o attacks.o fastpbkdf2.o
skul: $(SRC)skul.c $(OBJS)
$(COMP) -o $@ $(SRC)skul.c $(DIR)alloclib.o $(DIR)skulfs.o $(DIR)random.o $(DIR)af.o $(DIR)utils.o $(DIR)decrypt.o $(DIR)config.o $(DIR)thread.o $(DIR)attacks.o $(DIR)fastpbkdf2.o $(DLO)
skul_dbg: $(SRC)skul.c $(OBJS)
$(COMPDBG) -o $@ $(SRC)skul.c $(DIR)alloclib.o $(DIR)skulfs.o $(DIR)random.o $(DIR)af.o $(DIR)utils.o $(DIR)decrypt.o $(DIR)config.o $(DIR)thread.o $(DIR)attacks.o $(DIR)fastpbkdf2.o $(DLO)
alloclib.o: $(LIB)alloclib.c
$(COMP) -o $(DIR)$@ -c $(LIB)alloclib.c
skulfs.o: $(LIB)skulfs.c
$(COMP) -o $(DIR)$@ -c $(LIB)skulfs.c
utils.o: $(LIB)utils.c
$(COMP) -o $(DIR)$@ -c $(LIB)utils.c
decrypt.o: $(LIB)decrypt.c
$(COMP) -o $(DIR)$@ -c $(LIB)decrypt.c $(DLO)
random.o: $(LIB)random.c
$(COMP) -c $(LIB)random.c -o $(DIR)$@
af.o: $(LIB)af.c
$(COMP) -o $(DIR)$@ -c $(LIB)af.c $(DLO)
config.o: $(LIB)config.c
$(COMP) -o $(DIR)$@ -c $(LIB)config.c $(DLO)
thread.o: $(LIB)thread.c
$(COMP) -o $(DIR)$@ -c $(LIB)thread.c $(DLO)
fastpbkdf2.o: $(LIB)fastpbkdf2.c
$(COMP) -o $(DIR)$@ -c $(LIB)fastpbkdf2.c
attacks.o: $(LIB)attacks.c
$(COMP) -lm -o $(DIR)$@ -c $(LIB)attacks.c
clean:
rm $(DIR)*.o
rm skul
rm test
rm test_multi
cleanlog:
rm *.log
rm py/*.log