forked from hashcat/hashcat-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
236 lines (168 loc) · 6.17 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
##
## Makefile
##
DEBUG := 0
CFLAGS += -Wall -W -pipe -std=gnu99
ifeq ($(DEBUG),0)
CFLAGS += -O2
ifneq ($(UNAME),Darwin)
LFLAGS += -s
endif
else
ifeq ($(DEBUG),1)
ifneq ($(UNAME),Darwin)
CFLAGS += -DDEBUG -Og -ggdb
else
CFLAGS += -DDEBUG -O0 -ggdb
endif
else
ifeq ($(DEBUG),2)
ifneq ($(UNAME),Darwin)
CFLAGS += -DDEBUG -Og -ggdb
else
CFLAGS += -DDEBUG -O0 -ggdb
endif
CFLAGS += -fsanitize=address -fno-omit-frame-pointer
endif
endif
endif
all: clean native
release: native windows
$(STRIP_NATIVE) *.bin
$(STRIP_WINDOWS) *.exe
mv *.bin ../bin
mv *.exe ../bin
cp -a *.pl ../bin
clean:
rm -f ../bin/*
rm -f *.bin *.exe
rm -rf *.dSYM
##
## native
##
CC ?= gcc
CC_NATIVE = $(CC)
STRIP_NATIVE = strip
CFLAGS_NATIVE = $(CFLAGS)
LDFLAGS_NATIVE = $(LDFLAGS)
native: cap2hccapx.bin cleanup-rules.bin combinator.bin combinator3.bin combinatorX.bin combipow.bin ct3_to_ntlm.bin cutb.bin expander.bin gate.bin generate-rules.bin hcstatgen.bin hcstat2gen.bin keyspace.bin len.bin mli2.bin morph.bin permute.bin permute_exist.bin prepare.bin req-include.bin req-exclude.bin rli.bin rli2.bin rules_optimize.bin splitlen.bin strip-bsr.bin strip-bsn.bin
cap2hccapx.bin: cap2hccapx.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
cleanup-rules.bin: cleanup-rules.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
combinator.bin: combinator.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
combinator3.bin: combinator3.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
combinatorX.bin: combinatorX.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
combipow.bin: combipow.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
ct3_to_ntlm.bin: ct3_to_ntlm.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
cutb.bin: cutb.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
expander.bin: expander.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
gate.bin: gate.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
generate-rules.bin: generate-rules.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
hcstatgen.bin: hcstatgen.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
hcstat2gen.bin: hcstat2gen.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
keyspace.bin: keyspace.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
len.bin: len.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
mli2.bin: mli2.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
morph.bin: morph.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
permute.bin: permute.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
permute_exist.bin: permute_exist.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
prepare.bin: prepare.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
req-include.bin: req-include.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
req-exclude.bin: req-exclude.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
rli.bin: rli.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
rli2.bin: rli2.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
rules_optimize.bin: rules_optimize.c cpu_rules.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ rules_optimize.c cpu_rules.c
splitlen.bin: splitlen.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
strip-bsr.bin: strip-bsr.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
strip-bsn.bin: strip-bsn.c
${CC_NATIVE} ${CFLAGS_NATIVE} ${LDFLAGS_NATIVE} -o $@ $<
##
## WINDOWS
##
CC_WINDOWS = x86_64-w64-mingw32-gcc
STRIP_WINDOWS = x86_64-w64-mingw32-strip
CFLAGS_WINDOWS = $(CFLAGS) -D_WINDOWS
GLOB_WINDOWS = /usr/x86_64-w64-mingw32/lib/CRT_glob.o
windows: cap2hccapx.exe cleanup-rules.exe combinator.exe combinator3.exe combinatorX.exe combipow.exe ct3_to_ntlm.exe cutb.exe expander.exe gate.exe generate-rules.exe hcstatgen.exe hcstat2gen.exe keyspace.exe len.exe mli2.exe morph.exe permute.exe permute_exist.exe prepare.exe req-include.exe req-exclude.exe rli.exe rli2.exe rules_optimize.exe splitlen.exe strip-bsr.exe strip-bsn.exe
cap2hccapx.exe: cap2hccapx.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
cleanup-rules.exe: cleanup-rules.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
combinator.exe: combinator.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
combinator3.exe: combinator3.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
combinatorX.exe: combinatorX.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
combipow.exe: combipow.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
ct3_to_ntlm.exe: ct3_to_ntlm.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
cutb.exe: cutb.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
expander.exe: expander.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
gate.exe: gate.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
generate-rules.exe: generate-rules.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
hcstatgen.exe: hcstatgen.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
hcstat2gen.exe: hcstat2gen.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
keyspace.exe: keyspace.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
len.exe: len.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
mli2.exe: mli2.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
morph.exe: morph.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
permute.exe: permute.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
permute_exist.exe: permute_exist.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
prepare.exe: prepare.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
req-include.exe: req-include.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
req-exclude.exe: req-exclude.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
rli.exe: rli.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ rli.c ${GLOB_WINDOWS}
rli2.exe: rli2.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
rules_optimize.exe: rules_optimize.c cpu_rules.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ rules_optimize.c cpu_rules.c
splitlen.exe: splitlen.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
strip-bsr.exe: strip-bsr.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<
strip-bsn.exe: strip-bsn.c
${CC_WINDOWS} ${CFLAGS_WINDOWS} -o $@ $<