aircrack: update to 1.6

This commit is contained in:
Henrik Grimler 2021-01-05 12:15:48 +01:00 committed by Yaksh Bariya
parent 22d436ca93
commit 8c5c657d8f
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
8 changed files with 264 additions and 157 deletions

View File

@ -1,21 +0,0 @@
Bug report here: https://trac.aircrack-ng.org/ticket/1672
--- ./autocfg 2016-02-08 05:12:08.000000000 +0000
+++ ../autocfg 2018-03-05 21:34:31.725976283 +0000
@@ -116,7 +116,7 @@
}
case "$CC" in
- mips-* | arm-*)
+ mips-* | arm-* | aarch64-*)
IS_CROSS=1
IS_X86=0
;;
@@ -129,7 +129,7 @@
x86_64 | amd64 | i*86*)
IS_X86=1
;;
- *arm*)
+ *arm* | *aarch64*)
IS_ARM=1
;;
*mips*)

View File

@ -1,13 +1,12 @@
TERMUX_PKG_MAINTAINER="Auxilus @Auxilus"
TERMUX_PKG_HOMEPAGE=https://www.aircrack-ng.org/ TERMUX_PKG_HOMEPAGE=https://www.aircrack-ng.org/
TERMUX_PKG_DESCRIPTION="WiFi security auditing tools suite" TERMUX_PKG_DESCRIPTION="WiFi security auditing tools suite"
TERMUX_PKG_LICENSE="GPL-2.0" TERMUX_PKG_LICENSE="GPL-2.0"
#1.5.1 (requires autoconf, automake, libtool, shtool, pkg-config (and maybe libstdc and make/gmake) support) TERMUX_PKG_VERSION=1.6-git
TERMUX_PKG_VERSION=1.2-rc4 _COMMIT=e998873f148898179d3e1679bc09a087ae42fb74
TERMUX_PKG_REVISION=5 TERMUX_PKG_SRCURL=https://github.com/aircrack-ng/aircrack-ng/archive/${_COMMIT}.tar.gz
TERMUX_PKG_SRCURL=https://github.com/aircrack-ng/aircrack-ng/archive/${TERMUX_PKG_VERSION}.tar.gz TERMUX_PKG_SHA256=35acbdf655ff6f73aa614c409bf385005b920fab2ef64f2102c546fa9e935da5
TERMUX_PKG_SHA256=ed241ea423cab1c86e7882e901d5200d91b2f97d7efd703b0acf17742be47f9b TERMUX_PKG_DEPENDS="libc++, libnl, openssl, libpcap, pciutils, ethtool"
TERMUX_PKG_DEPENDS="libc++, libnl, openssl, libpcap, pciutils"
TERMUX_PKG_BUILD_IN_SRC=true
# TODO: in termux-packages, add support for these packages: shtool, libstdc, gmake termux_step_pre_configure() {
NOCONFIGURE=1 ./autogen.sh
}

View File

@ -0,0 +1,28 @@
commit d15bbabad48f0d8cb21c0e1d0b51d4a508b08867
Author: Henrik Grimler <henrik@grimler.se>
Date: Sun Mar 1 05:15:55 2020 +0100
byteorder.h: add section for android
diff --git a/include/aircrack-ng/osdep/byteorder.h b/include/aircrack-ng/osdep/byteorder.h
index 26f49740..44187070 100644
--- a/include/aircrack-ng/osdep/byteorder.h
+++ b/include/aircrack-ng/osdep/byteorder.h
@@ -82,6 +82,17 @@ typedef uint8_t u_int8_t;
#endif
+/*
+ * Android/termux
+ */
+#if defined(__ANDROID__)
+#include <asm/byteorder.h>
+#include <unistd.h>
+
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+
+#endif
+
/*
* Cygwin
*/

View File

@ -0,0 +1,217 @@
--- ../pseudo_intrinsics.h.orig 2021-01-05 10:30:02.709991310 +0000
+++ ./include/aircrack-ng/ce-wpa/pseudo_intrinsics.h 2021-01-05 10:32:59.940558340 +0000
@@ -93,9 +93,211 @@
#define VLOADU_EMULATED 1
#define vor vorrq_u32
#define vorn vornq_u32
-#define vroti_epi32(x, i) \
- (i > 0 ? vsliq_n_u32(vshrq_n_u32(x, 32 - (i)), x, i) \
- : vsriq_n_u32(vshlq_n_u32(x, 32 + (i)), x, -(i)))
+
+static uint32x4_t vroti_epi32(uint32x4_t x, int i)
+{
+
+ uint32x4_t out;
+
+ switch (i) {
+ case -32:
+ out = vsriq_n_u32(vshlq_n_u32(x, 0), x, 32);
+ break;
+ case -31:
+ out = vsriq_n_u32(vshlq_n_u32(x, 1), x, 31);
+ break;
+ case -30:
+ out = vsriq_n_u32(vshlq_n_u32(x, 2), x, 30);
+ break;
+ case -29:
+ out = vsriq_n_u32(vshlq_n_u32(x, 3), x, 29);
+ break;
+ case -28:
+ out = vsriq_n_u32(vshlq_n_u32(x, 4), x, 28);
+ break;
+ case -27:
+ out = vsriq_n_u32(vshlq_n_u32(x, 5), x, 27);
+ break;
+ case -26:
+ out = vsriq_n_u32(vshlq_n_u32(x, 6), x, 26);
+ break;
+ case -25:
+ out = vsriq_n_u32(vshlq_n_u32(x, 7), x, 25);
+ break;
+ case -24:
+ out = vsriq_n_u32(vshlq_n_u32(x, 8), x, 24);
+ break;
+ case -23:
+ out = vsriq_n_u32(vshlq_n_u32(x, 9), x, 23);
+ break;
+ case -22:
+ out = vsriq_n_u32(vshlq_n_u32(x, 10), x, 22);
+ break;
+ case -21:
+ out = vsriq_n_u32(vshlq_n_u32(x, 11), x, 21);
+ break;
+ case -20:
+ out = vsriq_n_u32(vshlq_n_u32(x, 12), x, 20);
+ break;
+ case -19:
+ out = vsriq_n_u32(vshlq_n_u32(x, 13), x, 19);
+ break;
+ case -18:
+ out = vsriq_n_u32(vshlq_n_u32(x, 14), x, 18);
+ break;
+ case -17:
+ out = vsriq_n_u32(vshlq_n_u32(x, 15), x, 17);
+ break;
+ case -16:
+ out = vsriq_n_u32(vshlq_n_u32(x, 16), x, 16);
+ break;
+ case -15:
+ out = vsriq_n_u32(vshlq_n_u32(x, 17), x, 15);
+ break;
+ case -14:
+ out = vsriq_n_u32(vshlq_n_u32(x, 18), x, 14);
+ break;
+ case -13:
+ out = vsriq_n_u32(vshlq_n_u32(x, 19), x, 13);
+ break;
+ case -12:
+ out = vsriq_n_u32(vshlq_n_u32(x, 20), x, 12);
+ break;
+ case -11:
+ out = vsriq_n_u32(vshlq_n_u32(x, 21), x, 11);
+ break;
+ case -10:
+ out = vsriq_n_u32(vshlq_n_u32(x, 22), x, 10);
+ break;
+ case -9:
+ out = vsriq_n_u32(vshlq_n_u32(x, 23), x, 9);
+ break;
+ case -8:
+ out = vsriq_n_u32(vshlq_n_u32(x, 24), x, 8);
+ break;
+ case -7:
+ out = vsriq_n_u32(vshlq_n_u32(x, 25), x, 7);
+ break;
+ case -6:
+ out = vsriq_n_u32(vshlq_n_u32(x, 26), x, 6);
+ break;
+ case -5:
+ out = vsriq_n_u32(vshlq_n_u32(x, 27), x, 5);
+ break;
+ case -4:
+ out = vsriq_n_u32(vshlq_n_u32(x, 28), x, 4);
+ break;
+ case -3:
+ out = vsriq_n_u32(vshlq_n_u32(x, 29), x, 3);
+ break;
+ case -2:
+ out = vsriq_n_u32(vshlq_n_u32(x, 30), x, 2);
+ break;
+ case -1:
+ out = vsriq_n_u32(vshlq_n_u32(x, 31), x, 1);
+ break;
+ case 0:
+ out = vsliq_n_u32(vshrq_n_u32(x, 32), x, 0);
+ break;
+ case 1:
+ out = vsliq_n_u32(vshrq_n_u32(x, 31), x, 1);
+ break;
+ case 2:
+ out = vsliq_n_u32(vshrq_n_u32(x, 30), x, 2);
+ break;
+ case 3:
+ out = vsliq_n_u32(vshrq_n_u32(x, 29), x, 3);
+ break;
+ case 4:
+ out = vsliq_n_u32(vshrq_n_u32(x, 28), x, 4);
+ break;
+ case 5:
+ out = vsliq_n_u32(vshrq_n_u32(x, 27), x, 5);
+ break;
+ case 6:
+ out = vsliq_n_u32(vshrq_n_u32(x, 26), x, 6);
+ break;
+ case 7:
+ out = vsliq_n_u32(vshrq_n_u32(x, 25), x, 7);
+ break;
+ case 8:
+ out = vsliq_n_u32(vshrq_n_u32(x, 24), x, 8);
+ break;
+ case 9:
+ out = vsliq_n_u32(vshrq_n_u32(x, 23), x, 9);
+ break;
+ case 10:
+ out = vsliq_n_u32(vshrq_n_u32(x, 22), x, 10);
+ break;
+ case 11:
+ out = vsliq_n_u32(vshrq_n_u32(x, 21), x, 11);
+ break;
+ case 12:
+ out = vsliq_n_u32(vshrq_n_u32(x, 20), x, 12);
+ break;
+ case 13:
+ out = vsliq_n_u32(vshrq_n_u32(x, 19), x, 13);
+ break;
+ case 14:
+ out = vsliq_n_u32(vshrq_n_u32(x, 18), x, 14);
+ break;
+ case 15:
+ out = vsliq_n_u32(vshrq_n_u32(x, 17), x, 15);
+ break;
+ case 16:
+ out = vsliq_n_u32(vshrq_n_u32(x, 16), x, 16);
+ break;
+ case 17:
+ out = vsliq_n_u32(vshrq_n_u32(x, 15), x, 17);
+ break;
+ case 18:
+ out = vsliq_n_u32(vshrq_n_u32(x, 14), x, 18);
+ break;
+ case 19:
+ out = vsliq_n_u32(vshrq_n_u32(x, 13), x, 19);
+ break;
+ case 20:
+ out = vsliq_n_u32(vshrq_n_u32(x, 12), x, 20);
+ break;
+ case 21:
+ out = vsliq_n_u32(vshrq_n_u32(x, 11), x, 21);
+ break;
+ case 22:
+ out = vsliq_n_u32(vshrq_n_u32(x, 10), x, 22);
+ break;
+ case 23:
+ out = vsliq_n_u32(vshrq_n_u32(x, 9), x, 23);
+ break;
+ case 24:
+ out = vsliq_n_u32(vshrq_n_u32(x, 8), x, 24);
+ break;
+ case 25:
+ out = vsliq_n_u32(vshrq_n_u32(x, 7), x, 25);
+ break;
+ case 26:
+ out = vsliq_n_u32(vshrq_n_u32(x, 6), x, 26);
+ break;
+ case 27:
+ out = vsliq_n_u32(vshrq_n_u32(x, 5), x, 27);
+ break;
+ case 28:
+ out = vsliq_n_u32(vshrq_n_u32(x, 4), x, 28);
+ break;
+ case 29:
+ out = vsliq_n_u32(vshrq_n_u32(x, 3), x, 29);
+ break;
+ case 30:
+ out = vsliq_n_u32(vshrq_n_u32(x, 2), x, 30);
+ break;
+ case 31:
+ out = vsliq_n_u32(vshrq_n_u32(x, 1), x, 31);
+ break;
+ default:
+ out = vdupq_n_u32(0);
+ break;
+ }
+ return out;
+}
#define vroti_epi64(x, i) \
(i > 0 ? (vtype) vsliq_n_u64( \
vshrq_n_u64((vtype64)(x), 64 - (i)), (vtype64)(x), i) \

View File

@ -1,11 +0,0 @@
--- ./common.mak 2015-12-31 19:42:10.000000000 +0000
+++ ../common.mak 2018-01-11 19:43:11.319604821 +0000
@@ -207,7 +207,7 @@
CFLAGS += $(OPTFLAGS) $(REVFLAGS) $(COMMON_CFLAGS)
-prefix = /usr/local
+prefix ?= /usr/local
bindir = $(prefix)/bin
sbindir = $(prefix)/sbin
mandir = $(prefix)/share/man/man1

View File

@ -1,57 +0,0 @@
commit 9a1846507ff043c397257206ff21adae90a122f4
Author: Thomas d'Otreppe <tdotreppe@aircrack-ng.org>
Date: Wed Dec 21 00:18:46 2016 +0000
Fixed compilation with OpenSSL 1.1.0 (Closes: #1711).
git-svn-id: http://svn.aircrack-ng.org/trunk@2882 28c6078b-6c39-48e3-add9-af49d547ecab
diff --git a/src/crypto.c b/src/crypto.c
index c3318753..46fa9c52 100644
--- a/src/crypto.c
+++ b/src/crypto.c
@@ -288,7 +288,15 @@ void calc_pmk( char *key, char *essid_pre, unsigned char pmk[40] )
void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80], unsigned char mic[20]) {
int i;
unsigned char pke[100];
+ #if defined(USE_GCRYPT) || OPENSSL_VERSION_NUMBER < 0x10100000L
+ #define HMAC_USE_NO_PTR
+ #endif
+
+ #ifdef HMAC_USE_NO_PTR
HMAC_CTX ctx;
+ #else
+ HMAC_CTX * ctx;
+ #endif
memcpy( pke, "Pairwise key expansion", 23 );
@@ -314,6 +322,7 @@ void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80],
memcpy( pke + 67, ap->wpa.snonce, 32 );
}
+ #ifdef HMAC_USE_NO_PTR
HMAC_CTX_init(&ctx);
HMAC_Init_ex(&ctx, pmk, 32, EVP_sha1(), NULL);
for(i = 0; i < 4; i++ )
@@ -325,6 +334,20 @@ void calc_mic (struct AP_info *ap, unsigned char pmk[32], unsigned char ptk[80],
HMAC_Final(&ctx, ptk + i*20, NULL);
}
HMAC_CTX_cleanup(&ctx);
+ #else
+ ctx = HMAC_CTX_new();
+ HMAC_Init_ex(ctx, pmk, 32, EVP_sha1(), NULL);
+ for(i = 0; i < 4; i++ )
+ {
+ pke[99] = i;
+ //HMAC(EVP_sha1(), values[0], 32, pke, 100, ptk + i * 20, NULL);
+ HMAC_Init_ex(ctx, 0, 0, 0, 0);
+ HMAC_Update(ctx, pke, 100);
+ HMAC_Final(ctx, ptk + i*20, NULL);
+ }
+ HMAC_CTX_free(ctx);
+ #endif
+ #undef HMAC_USE_NO_PTR
if( ap->wpa.keyver == 1 )
{

View File

@ -0,0 +1,11 @@
--- ../osdep-Makefile.inc.orig 2021-01-05 11:01:19.954675451 +0000
+++ ./lib/osdep/Makefile.inc 2021-01-05 11:01:30.914916657 +0000
@@ -96,7 +96,7 @@
endif
lib_LTLIBRARIES += libaircrack-osdep.la
-libaircrack_osdep_la_LDFLAGS = -release $(LT_VER) -no-undefined
+libaircrack_osdep_la_LDFLAGS = -no-undefined
libaircrack_osdep_la_CPPFLAGS = -I$(top_srcdir)/include/aircrack-ng/osdep $(AM_CPPFLAGS)
EXTRA_DIST += %D%/openbsd.c \

View File

@ -1,59 +0,0 @@
--- a/src/Makefile 2015-12-30 08:23:13.000000000 +0000
+++ b/src/Makefile 2018-01-11 19:31:06.217971593 +0000
@@ -156,21 +156,21 @@
aircrack-ng-opt: $(SRC_AC)
$(iCC) $(iCFLAGS) $(iOPTFLAGS) $(REVFLAGS) $(SRC_AC) $(ASM_AC) $(LIBSSL) \
- uniqueiv.o -o aircrack-ng-opt -lpthread $(LIBSQL)
+ uniqueiv.o -o aircrack-ng-opt $(LIBSQL)
aircrack-ng-opt-prof_gen: $(SRC_AC)
mkdir -p prof
$(iCC) $(iCFLAGS) $(iOPTFLAGS) $(REVFLAGS) -prof_genx -DDO_PGO_DUMP \
-prof_dir$(PROF_DIR) $(SRC_AC) $(ASM_AC) $(LIBSSL) uniqueiv.o -o \
- aircrack-ng-opt-prof_gen -lpthread $(LIBSQL)
+ aircrack-ng-opt-prof_gen $(LIBSQL)
aircrack-ng-opt-prof_use: $(SRC_AC)
$(iCC) $(iCFLAGS) $(iOPTFLAGS) $(REVFLAGS) -prof_use \
-prof_dir$(PROF_DIR) $(SRC_AC) $(ASM_AC) $(LIBSSL) uniqueiv.o -o \
- aircrack-ng-opt-prof -lpthread $(LIBSQL)
+ aircrack-ng-opt-prof $(LIBSQL)
aircrack-ng$(EXE): $(OBJS_AC)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AC) $(ASM_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL) $(LIBSTDCXX)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AC) $(ASM_AC) -o $(@) $(LIBSSL) $(LIBSQL) $(LIBSTDCXX)
ifeq ($(subst TRUE,true,$(filter TRUE true,$(multibin) $(MULTIBIN))),true)
wpapsk-simd.o: wpapsk.c
@@ -183,10 +183,10 @@
$(CC) $(filter-out -DOLD_SSE_CORE,$(CFLAGS)) -c -o $(@) wpapsk.c
aircrack-ng-simd$(EXE): $(OBJS_AC_MULTI) wpapsk-simd.o $(OBJ_MEMORY) $(OBJ_SIMD_CORE)
- $(CC) $(filter-out -DOLD_SSE_CORE,$(CFLAGS)) $(LDFLAGS) $(OBJS_AC_MULTI) $(OBJ_MEMORY) $(OBJ_SIMD_CORE) aircrack-ng-core.o wpapsk-simd.o $(ASM_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL) $(LIBSTDCXX) $(LIBLINECOUNT)
+ $(CC) $(filter-out -DOLD_SSE_CORE,$(CFLAGS)) $(LDFLAGS) $(OBJS_AC_MULTI) $(OBJ_MEMORY) $(OBJ_SIMD_CORE) aircrack-ng-core.o wpapsk-simd.o $(ASM_AC) -o $(@) $(LIBSSL) $(LIBSQL) $(LIBSTDCXX) $(LIBLINECOUNT)
aircrack-ng-sse$(EXE): $(OBJS_AC_MULTI) wpapsk-sse.o $(OBJ_MEMORY) $(OBJ_SSE_CORE)
- $(CC) $(filter-out -DOLD_SSE_CORE,$(CFLAGS)) $(LDFLAGS) $(OBJS_AC_MULTI) $(OBJ_MEMORY) $(OBJ_SSE_CORE) aircrack-ng-core.o wpapsk-sse.o $(ASM_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL) $(LIBSTDCXX) $(LIBLINECOUNT)
+ $(CC) $(filter-out -DOLD_SSE_CORE,$(CFLAGS)) $(LDFLAGS) $(OBJS_AC_MULTI) $(OBJ_MEMORY) $(OBJ_SSE_CORE) aircrack-ng-core.o wpapsk-sse.o $(ASM_AC) -o $(@) $(LIBSSL) $(LIBSQL) $(LIBSTDCXX) $(LIBLINECOUNT)
endif
airdecap-ng$(EXE): $(OBJS_AD)
@@ -199,7 +199,7 @@
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AR) -o $(@) $(LIBS) $(LIBSSL)
airodump-ng$(EXE): $(OBJS_ADU) $(LIBOSD)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_ADU) -o $(@) $(LIBS) $(LIBSSL) -lpthread $(LIBPCRE)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_ADU) -o $(@) $(LIBS) $(LIBSSL) $(LIBPCRE)
airserv-ng$(EXE): $(OBJS_AS) $(LIBOSD)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AS) -o $(@) $(LIBS)
@@ -235,7 +235,7 @@
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AL) -o $(@) $(LIBSSL) -DHAVE_REGEXP $(LIBSQL)
airbase-ng$(EXE): $(OBJS_AB) $(LIBOSD)
- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AB) -o $(@) $(LIBS) $(LIBSSL) -lpthread
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AB) -o $(@) $(LIBS) $(LIBSSL)
airdecloak-ng$(EXE): $(OBJS_AU)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AU) -o $(@) $(LDFLAGS)