forked from kriswebdev/android_aircrack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.mk
231 lines (189 loc) · 8.34 KB
/
Android.mk
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
# KrisWebDev[n01ce] Android.mk to build aircrack-ng suite for Android
# Android.mk version: 1.1
LOCAL_PATH:=$(call my-dir)
MY_SRC_PTW := src/aircrack-ptw-lib.c
MY_SRC_AC := src/aircrack-ng.c src/crypto.c src/common.c $(MY_SRC_PTW)
MY_OBJS_PTW := src/aircrack-ptw-lib.c
MY_OBJS_AC := src/aircrack-ng.c src/crypto.c src/common.c src/uniqueiv.c $(MY_OBJS_PTW)
MY_OBJS_AD := src/airdecap-ng.c src/crypto.c src/common.c
MY_OBJS_PF := src/packetforge-ng.c src/common.c src/crypto.c
MY_OBJS_AR := src/aireplay-ng.c src/common.c src/crypto.c src/osdep/radiotap/radiotap.c
MY_OBJS_ADU := src/airodump-ng.c src/common.c src/crypto.c src/uniqueiv.c src/osdep/radiotap/radiotap.c
MY_OBJS_AT := src/airtun-ng.c src/common.c src/crypto.c src/osdep/radiotap/radiotap.c
MY_OBJS_IV := src/ivstools.c src/common.c src/crypto.c src/uniqueiv.c
MY_OBJS_AS := src/airserv-ng.c src/common.c src/osdep/radiotap/radiotap.c
MY_OBJS_WS := src/wesside-ng.c src/crypto.c src/common.c src/osdep/radiotap/radiotap.c $(MY_OBJS_PTW)
MY_OBJS_BS := src/besside-ng.c src/crypto.c src/common.c src/osdep/radiotap/radiotap.c $(MY_OBJS_PTW)
MY_OBJS_BC := src/besside-ng-crawler.c
MY_OBJS_AL := src/airolib-ng.c src/crypto.c src/common.c
MY_OBJS_ES := src/easside-ng.c src/common.c src/osdep/radiotap/radiotap.c
MY_OBJS_BUDDY := src/buddy-ng.c src/common.c
MY_OBJS_MI := src/makeivs-ng.c src/common.c src/uniqueiv.c
MY_OBJS_AB := src/airbase-ng.c src/common.c src/crypto.c src/osdep/radiotap/radiotap.c
MY_OBJS_AU := src/airdecloak-ng.c src/common.c src/osdep/radiotap/radiotap.c
MY_OBJS_TT := src/tkiptun-ng.c src/common.c src/crypto.c src/osdep/radiotap/radiotap.c
MY_OBJS_WC := src/wpaclean.c src/osdep/radiotap/radiotap.c
# removed libcrypto_static
MY_LIBSSL_STATIC :=
MY_LIBSSL_SHARED := libssl libcrypto
MY_LIBSQL := libsqlite
# src/osdep/airpcap.c
# LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/src
# LOCAL_EXPORT_C_INCLUDES += $(LOCAL_PATH)/openssl/include
# LIBAIRPCAP = -DHAVE_AIRPCAP -I$(AC_ROOT)/../developers/Airpcap_Devpack/include
MY_CFLAGS := -g -W -Wall -O3 -DANDROID -D_REVISION=0 -D_FILE_OFFSET_BITS=64 -Wno-unused-but-set-variable -Wno-array-bounds -I $(LOCAL_PATH)/src -I $(LOCAL_PATH)/openssl/include -I $(LOCAL_PATH)/src/osdep -I $(LOCAL_PATH)/src/osdep/radiotap -I $(LOCAL_PATH)/src/include -D__int8_t_defined -fPIC -mandroid -DANDROID -DOS_ANDROID -DLinux -DHAVE_SQLITE
MY_OBJS_OSD := src/osdep/network.c src/osdep/file.c src/osdep/osdep.c src/osdep/linux.c src/osdep/linux_tap.c src/osdep/common.c
include $(CLEAR_VARS)
# CyanogenMod libopenssl has no LOCAL_EXPORT_C_INCLUDES statement so we need to find the headers.
# You must place this folder into CyanogenMod /external folder so that this Android makefile can find the openssl headers.
LOCAL_MODULE := aircrack-ng
LOCAL_SRC_FILES := $(MY_OBJS_AC)
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include $(LOCAL_PATH)/../sqlite/dist
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED) $(MY_LIBSQL)
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := airdecap-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_AD)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED)
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := packetforge-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_PF)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED)
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := aireplay-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_OSD) $(MY_OBJS_AR)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED)
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := airodump-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_OSD) $(MY_OBJS_ADU)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED) # libpcap libsqlite3
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := airserv-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_OSD) $(MY_OBJS_AS)
LOCAL_SHARED_LIBRARIES := libnl_2
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := airtun-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_OSD) $(MY_OBJS_AT)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED)
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := ivstools
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_IV)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED)
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := kstats
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := src/kstats.c
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
# Edit wesside-ng.c to replace #include <sys/termios.h> by #include <termios.h>
LOCAL_MODULE := wesside-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_OSD) $(MY_OBJS_WS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED)
# Buggy -lz LDLIB : http://stackoverflow.com/questions/23182819/android-ndk-fatal-error-zlib-h-no-such-file-or-directory
#LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -lz
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../zlib/src
LOCAL_SHARED_LIBRARIES += libz
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := easside-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_OSD) $(MY_OBJS_ES)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../zlib/src
LOCAL_SHARED_LIBRARIES += libz
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := buddy-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_BUDDY)
include $(BUILD_EXECUTABLE)
# error: unknown type name 'pthread_cond_t':
# Add #include <pthread.h> in besside-ng.c
include $(CLEAR_VARS)
LOCAL_MODULE := besside-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_OSD) $(MY_OBJS_BS)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED)
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../zlib/src
LOCAL_SHARED_LIBRARIES += libz
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := makeivs-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_MI)
include $(BUILD_EXECUTABLE)
# error: unknown type name 'pthread_cond_t':
# Add #include <pthread.h> in airolib-ng.c
include $(CLEAR_VARS)
LOCAL_MODULE := airolib-ng
LOCAL_CFLAGS += $(MY_CFLAGS) -DHAVE_REGEXP
LOCAL_SRC_FILES := $(MY_OBJS_AL)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include $(LOCAL_PATH)/../sqlite/dist
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED) $(MY_LIBSQL)
include $(BUILD_EXECUTABLE)
# This won't throw compilation error but runtime error...
# Edit linux_tap.c: Replace "/dev/net/tun" by "/dev/tun"
include $(CLEAR_VARS)
LOCAL_MODULE := airbase-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_OSD) $(MY_OBJS_AB)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED)
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := airdecloak-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_AU)
LOCAL_SHARED_LIBRARIES := libnl_2
include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS)
LOCAL_MODULE := tkiptun-ng
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_OSD) $(MY_OBJS_TT)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED)
include $(BUILD_EXECUTABLE)
# Add #include <pthread.h> in wpaclean.c
include $(CLEAR_VARS)
LOCAL_MODULE := wpaclean
LOCAL_CFLAGS += $(MY_CFLAGS)
LOCAL_SRC_FILES := $(MY_OBJS_OSD) $(MY_OBJS_WC)
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../openssl/include
LOCAL_STATIC_LIBRARIES := $(MY_LIBSSL_STATIC)
LOCAL_SHARED_LIBRARIES := $(MY_LIBSSL_SHARED)
include $(BUILD_EXECUTABLE)