From f1a93793f2743cf93f6688f9e97e4bc2fb65ff06 Mon Sep 17 00:00:00 2001 From: Foxtrot Date: Tue, 20 Aug 2019 16:44:01 +0100 Subject: [PATCH] Packages: Add mdk3 package --- network/mdk3/Makefile | 44 +++++++++++++++++++ .../patches/001-radiotap_needs_types_h.patch | 10 +++++ .../mdk3/patches/010-fix-dependencies.patch | 17 +++++++ .../020-Makefile_honour_CFLAGS_for_VFP.patch | 8 ++++ 4 files changed, 79 insertions(+) create mode 100644 network/mdk3/Makefile create mode 100644 network/mdk3/patches/001-radiotap_needs_types_h.patch create mode 100644 network/mdk3/patches/010-fix-dependencies.patch create mode 100644 network/mdk3/patches/020-Makefile_honour_CFLAGS_for_VFP.patch diff --git a/network/mdk3/Makefile b/network/mdk3/Makefile new file mode 100644 index 0000000..8d752b9 --- /dev/null +++ b/network/mdk3/Makefile @@ -0,0 +1,44 @@ +# +# Copyright (C) 2009-2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mdk3 +PKG_VERSION:=v6 +PKG_RELEASE:=2 +PKG_MD5SUM:=67705a814ded2a2e6f70522ca0dc6da9 + +PKG_BUILD_DIR:=$(BUILD_DIR)/mdk3-$(PKG_VERSION) +PKG_SOURCE_URL:=http://homepages.tu-darmstadt.de/~p_larbig/wlan/ +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 + +PKG_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/mdk3 + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libpthread + TITLE:= MDK3 + URL:=http://homepages.tu-darmstadt.de/~p_larbig/wlan/ + SUBMENU:=wireless +endef + +define Package/mdk3/description + Tool to exploit wireless vulnerabilities +endef + +MAKE_FLAGS += \ + $(TARGET_CONFIGURE_OPTS) + +define Package/mdk3/install + $(INSTALL_DIR) $(1)/usr/sbin + $(CP) $(PKG_BUILD_DIR)/mdk3 $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,mdk3)) diff --git a/network/mdk3/patches/001-radiotap_needs_types_h.patch b/network/mdk3/patches/001-radiotap_needs_types_h.patch new file mode 100644 index 0000000..3f2b60c --- /dev/null +++ b/network/mdk3/patches/001-radiotap_needs_types_h.patch @@ -0,0 +1,10 @@ +--- a/osdep/radiotap/radiotap-parser.c ++++ b/osdep/radiotap/radiotap-parser.c +@@ -18,6 +18,7 @@ + + #include + #include ++#include + + #include "radiotap-parser.h" + diff --git a/network/mdk3/patches/010-fix-dependencies.patch b/network/mdk3/patches/010-fix-dependencies.patch new file mode 100644 index 0000000..e55a1c9 --- /dev/null +++ b/network/mdk3/patches/010-fix-dependencies.patch @@ -0,0 +1,17 @@ +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -18,8 +18,8 @@ osd: + $(LIBOSD): + $(MAKE) -C $(OSD) + +-mdk3: mdk3.c $(OSD)/libosdep.a +- $(CC) $(CFLAGS) $(LINKFLAGS) $^ -o $@ $(LIBS) ++mdk3: $(LIBOSD) mdk3.c ++ $(CC) $(CFLAGS) $(LINKFLAGS) mdk3.c $(OSD)/lib$(OSD).a -o $@ $(LIBS) + + install: mdk3 + $(MAKE) -C $(OSD) install diff --git a/network/mdk3/patches/020-Makefile_honour_CFLAGS_for_VFP.patch b/network/mdk3/patches/020-Makefile_honour_CFLAGS_for_VFP.patch new file mode 100644 index 0000000..9a420c2 --- /dev/null +++ b/network/mdk3/patches/020-Makefile_honour_CFLAGS_for_VFP.patch @@ -0,0 +1,8 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS = -g -O3 -Wall -Wextra ++CFLAGS += -g -O3 -Wall -Wextra + LINKFLAGS = -lpthread + + DESTDIR =