Browse Source

Merge pull request #7447 from jbenden/aircrack-ng-1.4

aircrack-ng: Update to 1.4
lilik-openwrt-22.03
Hannu Nyman 6 years ago
committed by GitHub
parent
commit
eb1a7f9d22
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 84 additions and 72 deletions
  1. +34
    -0
      net/aircrack-ng/Config.in
  2. +50
    -13
      net/aircrack-ng/Makefile
  3. +0
    -59
      net/aircrack-ng/patches/100-fix-openssl-1.1-compatibility.patch

+ 34
- 0
net/aircrack-ng/Config.in View File

@ -0,0 +1,34 @@
if PACKAGE_aircrack-ng
comment "SSL support"
choice
prompt "Select SSL library"
default AIRCRACK_NG_OPENSSL
config AIRCRACK_NG_OPENSSL
bool "openssl"
config AIRCRACK_NG_GCRYPT
bool "gcrypt"
endchoice
config AIRCRACK_NG_OPTIMIZE_SPEED
bool "Optimize for speed"
default n
help
This enables additional optimization and
increases performance considerably at the
expense of binary size.
comment "Miscellaneous"
config AIRCRACK_NG_HWLOC
bool "Hwloc support"
default n
config AIRCRACK_NG_SQLITE3
bool "Sqlite3 support"
default n
endif

+ 50
- 13
net/aircrack-ng/Makefile View File

@ -8,29 +8,43 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=aircrack-ng
PKG_VERSION:=1.2-rc1
PKG_RELEASE:=3
PKG_VERSION:=1.4
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://download.aircrack-ng.org/ \
http://archive.aircrack-ng.org/aircrack-ng/$(PKG_VERSION)/
PKG_HASH:=cf3134521e1c3d7aed4e384e3e5e7b6959e2d485bd1554474608a3a9328e35fd
PKG_SOURCE_URL:=https://codeload.github.com/aircrack-ng/aircrack-ng/tar.gz/$(PKG_VERSION)?
PKG_HASH:=425122525e9c7dd8834d75b6716516f2b673342b7e04fa247ec277a8c8433b47
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_MAINTAINER:=Rick Farina <zerochaos@gentoo.org>
PKG_FIXUP:=autoreconf
PKG_CONFIG_DEPENDS:= \
CONFIG_AIRCRACK_NG_GCRYPT \
CONFIG_AIRCRACK_NG_OPENSSL \
\
CONFIG_AIRCRACK_NG_OPTIMIZE_SPEED \
\
CONFIG_AIRCRACK_NG_HWLOC \
CONFIG_AIRCRACK_NG_SQLITE3
include $(INCLUDE_DIR)/package.mk
define Package/aircrack-ng
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libpcap +libpthread +libopenssl +libnl-core +libnl-genl +zlib
DEPENDS:=+AIRCRACK_NG_HWLOC:libhwloc +libpcap +libpcre +libpthread
DEPENDS += +AIRCRACK_NG_OPENSSL:libopenssl
DEPENDS += +AIRCRACK_NG_GCRYPT:libgcrypt
DEPENDS += +AIRCRACK_NG_SQLITE3:libsqlite3
DEPENDS += +libnl-core +libnl-genl +zlib
TITLE:=WLAN tools (without airmon-ng) for breaking 802.11 WEP/WPA keys
URL:=http://www.aircrack-ng.org/
URL:=https://www.aircrack-ng.org/
SUBMENU:=wireless
endef
@ -38,6 +52,10 @@ define Package/aircrack-ng/description
WLAN tools for breaking 802.11 WEP/WPA keys
endef
define Package/aircrack-ng/config
source "$(SOURCE)/Config.in"
endef
define Package/airmon-ng
SECTION:=net
CATEGORY:=Network
@ -51,19 +69,38 @@ define Package/airmon-ng/description
Bash script designed to turn wireless cards into monitor mode.
endef
TARGET_CFLAGS += -std=gnu89
CONFIGURE_ARGS += \
--disable-silent-rules \
--enable-shared \
--with-experimental \
--with-libpcap-include=$(STAGING_DIR)/usr/include \
--with-libpcap-lib=$(STAGING_DIR)/usr/lib \
--without-opt \
\
PYTHON=$(PYTHON) \
\
$(if $(CONFIG_AIRCRACK_NG_OPENSSL),--with-openssl,--without-openssl) \
$(if $(CONFIG_AIRCRACK_NG_GCRYPT),--with-gcrypt,--without-gcrypt) \
$(if $(CONFIG_AIRCRACK_NG_HWLOC),--enable-hwloc,--disable-hwloc) \
$(if $(CONFIG_AIRCRACK_NG_SQLITE3),--with-sqlite3,--without-sqlite3)
TARGET_CFLAGS += -Wall -Wextra -ffunction-sections -fdata-sections
ifeq ($(CONFIG_AIRCRACK_NG_OPTIMIZE_SPEED),y)
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
endif
MAKE_FLAGS += prefix=/usr \
libnl=true \
sqlite=false \
unstable=false \
OSNAME=Linux
TARGET_LDFLAGS+= \
-static-libstdc++ \
-Wl,--gc-sections
define Package/aircrack-ng/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
rm -f $(1)/usr/sbin/airmon-ng
endef


+ 0
- 59
net/aircrack-ng/patches/100-fix-openssl-1.1-compatibility.patch View File

@ -1,59 +0,0 @@
From 9a1846507ff043c397257206ff21adae90a122f4 Mon Sep 17 00:00:00 2001
From: Thomas d'Otreppe <tdotreppe@aircrack-ng.org>
Date: Wed, 21 Dec 2016 00:18:46 +0000
Subject: [PATCH] Fixed compilation with OpenSSL 1.1.0 (Closes: #1711).
git-svn-id: http://svn.aircrack-ng.org/trunk@2882 28c6078b-6c39-48e3-add9-af49d547ecab
---
src/crypto.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
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 )
{

Loading…
Cancel
Save