diff --git a/net-wireless/mdk4/Manifest b/net-wireless/mdk4/Manifest new file mode 100644 index 0000000..b324dce --- /dev/null +++ b/net-wireless/mdk4/Manifest @@ -0,0 +1 @@ +DIST mdk4-4.1.tar.gz 271042 BLAKE2B afa8baf4aa74966f7406884d0c8bb73986e85126ec03f8c1918ed365c64ea7be858af377a7b4b81792ef77fdcff073c23bfc11fe03abe864d8c83df9f6c7630f SHA512 b1472458ca02bf94f8717ac70b631f994c38cb67012fc38df0b6859778790b220447e6c1b3f15558e8f203da06ffa83bd36e5f037cb704e893c3fcf329022adc diff --git a/net-wireless/mdk4/files/include_stdlib.patch b/net-wireless/mdk4/files/include_stdlib.patch new file mode 100644 index 0000000..0e0acb1 --- /dev/null +++ b/net-wireless/mdk4/files/include_stdlib.patch @@ -0,0 +1,19 @@ +diff --git a/src/attacks/attacks.c b/src/attacks/attacks.c +index e511e70..e75f660 100644 +--- a/src/attacks/attacks.c ++++ b/src/attacks/attacks.c +@@ -1,3 +1,4 @@ ++#include + #include + + #include "attacks.h" +diff --git a/src/attacks/dummy.c b/src/attacks/dummy.c +index 8fe5ba8..ae7aae2 100644 +--- a/src/attacks/dummy.c ++++ b/src/attacks/dummy.c +@@ -1,4 +1,5 @@ + #include ++#include + #include + + #include "dummy.h" diff --git a/net-wireless/mdk4/mdk4-4.1.ebuild b/net-wireless/mdk4/mdk4-4.1.ebuild new file mode 100644 index 0000000..17b720e --- /dev/null +++ b/net-wireless/mdk4/mdk4-4.1.ebuild @@ -0,0 +1,50 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +DESCRIPTION="Proof-of-concept tool to exploit common IEEE 802.11 protocol weaknesses." +HOMEPAGE="https://github.com/aircrack-ng/mdk4" + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/aircrack-ng/mdk4.git" +else + SRC_URI="https://github.com/aircrack-ng/mdk4/archive/"${PV}".tar.gz -> "${P}".tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3" +SLOT="0" + +RDEPEND=" + dev-libs/libnl:3 + net-libs/libpcap +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( ""${FILESDIR}"/include_stdlib.patch" ) +# https://github.com/aircrack-ng/mdk4/commit/a70d75cff34ba24231e75bcef7f8075eb4e7b0a3 + +src_configure() { + filter-flags -fno-common + append-flags -fcommon + default +} + +src_install() { + # The install phase is a tad bit too funky, so doing by hand + dosbin src/mdk4 + doman man/mdk4.1 + + insinto /usr/share/"${PN}" + doins -r useful_files + + HTML_DOCS="docs" + einstalldocs + + dodoc AUTHORS CHANGELOG TODO +} diff --git a/net-wireless/mdk4/mdk4-9999.ebuild b/net-wireless/mdk4/mdk4-9999.ebuild new file mode 100644 index 0000000..64aa828 --- /dev/null +++ b/net-wireless/mdk4/mdk4-9999.ebuild @@ -0,0 +1,47 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic + +DESCRIPTION="Proof-of-concept tool to exploit common IEEE 802.11 protocol weaknesses." +HOMEPAGE="https://github.com/aircrack-ng/mdk4" + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/aircrack-ng/mdk4.git" +else + SRC_URI="https://github.com/aircrack-ng/mdk4/archive/"${PV}".tar.gz -> "${P}".tar.gz" + KEYWORDS="~amd64" +fi + +LICENSE="GPL-3" +SLOT="0" + +RDEPEND=" + dev-libs/libnl:3 + net-libs/libpcap +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +src_configure() { + filter-flags -fno-common + append-flags -fcommon + default +} + +src_install() { + # The install phase is a tad bit too funky, so doing by hand + dosbin src/mdk4 + doman man/mdk4.1 + + insinto /usr/share/"${PN}" + doins -r useful_files + + HTML_DOCS="docs" + einstalldocs + + dodoc AUTHORS CHANGELOG TODO +} diff --git a/net-wireless/mdk4/metadata.xml b/net-wireless/mdk4/metadata.xml new file mode 100644 index 0000000..e17cd36 --- /dev/null +++ b/net-wireless/mdk4/metadata.xml @@ -0,0 +1,7 @@ + + + + + aircrack-ng/mdk4 + +