From ab9f28696413f21dd628f118d0a55118474c43f1 Mon Sep 17 00:00:00 2001 From: Anton Bolshakov Date: Tue, 22 Apr 2025 11:47:52 +0800 Subject: [PATCH] aircrack-ng: fork for python 3.13 testing --- net-wireless/aircrack-ng/Manifest | 1 + .../aircrack-ng/aircrack-ng-1.7-r3.ebuild | 111 ++++++++++++++++++ .../aircrack-ng/aircrack-ng-9999.ebuild | 111 ++++++++++++++++++ net-wireless/aircrack-ng/metadata.xml | 27 +++++ net-wireless/lorcon/Manifest | 1 + ...orcon-2020.06.06_p20220216-C99-decls.patch | 20 ++++ .../lorcon-2020.06.06_p20220216-r3.ebuild | 76 ++++++++++++ net-wireless/lorcon/metadata.xml | 11 ++ 8 files changed, 358 insertions(+) create mode 100644 net-wireless/aircrack-ng/Manifest create mode 100644 net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild create mode 100644 net-wireless/aircrack-ng/aircrack-ng-9999.ebuild create mode 100644 net-wireless/aircrack-ng/metadata.xml create mode 100644 net-wireless/lorcon/Manifest create mode 100644 net-wireless/lorcon/files/lorcon-2020.06.06_p20220216-C99-decls.patch create mode 100644 net-wireless/lorcon/lorcon-2020.06.06_p20220216-r3.ebuild create mode 100644 net-wireless/lorcon/metadata.xml diff --git a/net-wireless/aircrack-ng/Manifest b/net-wireless/aircrack-ng/Manifest new file mode 100644 index 000000000..55cb590f4 --- /dev/null +++ b/net-wireless/aircrack-ng/Manifest @@ -0,0 +1 @@ +DIST aircrack-ng-1.7.tar.gz 7740634 BLAKE2B 4461af7b698d30c96e6f93494d5ee658bf8d7144d8b165e9b8aee1766a35dddded3bbb738237e1100dcf22167125aa7cf9149288bba1607fe778470b04596cb2 SHA512 3e6433cba1d6b122701245e8904480de9957dad033c1642cc45b30339e9391ffa21b39b2cc712bcba79bc2c2e26f2964be8f28a27081dc4bb323792cb7df2478 diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild new file mode 100644 index 000000000..8c9ac1e2b --- /dev/null +++ b/net-wireless/aircrack-ng/aircrack-ng-1.7-r3.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..13} ) +DISTUTILS_OPTIONAL=1 + +inherit distutils-r1 autotools + +DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys" +HOMEPAGE="http://www.aircrack-ng.org" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/aircrack-ng/aircrack-ng.git" +else + MY_PV=${PV/_/-} + SRC_URI="https://github.com/aircrack-ng/aircrack-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="amd64 arm ~arm64 ~ppc x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="GPL-2" +SLOT="0" + +IUSE="+airdrop-ng +airgraph-ng +experimental +netlink +pcre +sqlite test" + +CDEPEND="net-libs/libpcap + sys-apps/hwloc:0= + dev-libs/libbsd + dev-libs/openssl:0= + netlink? ( dev-libs/libnl:3 ) + pcre? ( dev-libs/libpcre ) + airdrop-ng? ( ${PYTHON_DEPS} ) + airgraph-ng? ( ${PYTHON_DEPS} ) + experimental? ( sys-libs/zlib ) + sqlite? ( >=dev-db/sqlite-3.4:3 ) + " +DEPEND="${CDEPEND} + test? ( dev-tcltk/expect ) + " +RDEPEND="${CDEPEND} + kernel_linux? ( + net-wireless/iw + net-wireless/wireless-tools + sys-apps/ethtool + sys-apps/usbutils + sys-apps/pciutils ) + sys-apps/hwdata + airdrop-ng? ( net-wireless/lorcon[python,${PYTHON_USEDEP}] )" +BDEPEND="airdrop-ng? ( ${DISTUTILS_DEPS} ) + airgraph-ng? ( ${DISTUTILS_DEPS} )" + +REQUIRED_USE="airdrop-ng? ( ${PYTHON_REQUIRED_USE} ) + airgraph-ng? ( ${PYTHON_REQUIRED_USE} )" + +RESTRICT="!test? ( test )" + +src_prepare() { + default + eautoreconf + if use airgraph-ng || use airdrop-ng; then + distutils-r1_src_prepare + fi +} + +src_configure() { + econf \ + STATIC_LIBDIR_NAME="$(get_libdir)" \ + --disable-asan \ + --enable-shared \ + --disable-static \ + --without-opt \ + --with-duma=no \ + $(use_enable netlink libnl) \ + $(use_with experimental) \ + $(use_with sqlite sqlite3) +} + +python_compile() { + if use airgraph-ng; then + cd "${S}/scripts/airgraph-ng" || die + distutils-r1_python_compile + fi + if use airdrop-ng; then + if [ -d "${BUILD_DIR}"/build ]; then + rm -r "${BUILD_DIR}"/build || die + fi + cd "${S}/scripts/airdrop-ng" || die + distutils-r1_python_compile + fi +} + +src_compile() { + default + if use airgraph-ng || use airdrop-ng; then + distutils-r1_src_compile + fi +} + +src_install() { + default + if use airgraph-ng || use airdrop-ng; then + distutils-r1_src_install + fi + + # we don't need aircrack-ng's oui updater, we have our own + rm "${ED}"/usr/sbin/airodump-ng-oui-update || die + find "${D}" -xtype f -name '*.la' -delete || die +} diff --git a/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild b/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild new file mode 100644 index 000000000..5ddf5f127 --- /dev/null +++ b/net-wireless/aircrack-ng/aircrack-ng-9999.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..13} ) +DISTUTILS_OPTIONAL=1 + +inherit distutils-r1 autotools + +DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys" +HOMEPAGE="http://www.aircrack-ng.org" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/aircrack-ng/aircrack-ng.git" +else + MY_PV=${PV/_/-} + SRC_URI="https://github.com/aircrack-ng/aircrack-ng/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="GPL-2" +SLOT="0" + +IUSE="+airdrop-ng +airgraph-ng +experimental +netlink +pcre +sqlite test" + +CDEPEND="net-libs/libpcap + sys-apps/hwloc:0= + dev-libs/libbsd + dev-libs/openssl:0= + netlink? ( dev-libs/libnl:3 ) + pcre? ( dev-libs/libpcre2:= ) + airdrop-ng? ( ${PYTHON_DEPS} ) + airgraph-ng? ( ${PYTHON_DEPS} ) + experimental? ( sys-libs/zlib ) + sqlite? ( >=dev-db/sqlite-3.4:3 ) + " +DEPEND="${CDEPEND} + test? ( dev-tcltk/expect ) + " +RDEPEND="${CDEPEND} + kernel_linux? ( + net-wireless/iw + net-wireless/wireless-tools + sys-apps/ethtool + sys-apps/usbutils + sys-apps/pciutils ) + sys-apps/hwdata + airdrop-ng? ( net-wireless/lorcon[python,${PYTHON_USEDEP}] )" +BDEPEND="airdrop-ng? ( ${DISTUTILS_DEPS} ) + airgraph-ng? ( ${DISTUTILS_DEPS} )" + +REQUIRED_USE="airdrop-ng? ( ${PYTHON_REQUIRED_USE} ) + airgraph-ng? ( ${PYTHON_REQUIRED_USE} )" + +RESTRICT="!test? ( test )" + +src_prepare() { + default + eautoreconf + if use airgraph-ng || use airdrop-ng; then + distutils-r1_src_prepare + fi +} + +src_configure() { + econf \ + STATIC_LIBDIR_NAME="$(get_libdir)" \ + --disable-asan \ + --enable-shared \ + --disable-static \ + --without-opt \ + --with-duma=no \ + $(use_enable netlink libnl) \ + $(use_with experimental) \ + $(use_with sqlite sqlite3) +} + +python_compile() { + if use airgraph-ng; then + cd "${S}/scripts/airgraph-ng" || die + distutils-r1_python_compile + fi + if use airdrop-ng; then + if [ -d "${BUILD_DIR}"/build ]; then + rm -r "${BUILD_DIR}"/build || die + fi + cd "${S}/scripts/airdrop-ng" || die + distutils-r1_python_compile + fi +} + +src_compile() { + default + if use airgraph-ng || use airdrop-ng; then + distutils-r1_src_compile + fi +} + +src_install() { + default + if use airgraph-ng || use airdrop-ng; then + distutils-r1_src_install + fi + + # we don't need aircrack-ng's oui updater, we have our own + rm "${ED}"/usr/sbin/airodump-ng-oui-update || die + find "${D}" -xtype f -name '*.la' -delete || die +} diff --git a/net-wireless/aircrack-ng/metadata.xml b/net-wireless/aircrack-ng/metadata.xml new file mode 100644 index 000000000..bf806e2bf --- /dev/null +++ b/net-wireless/aircrack-ng/metadata.xml @@ -0,0 +1,27 @@ + + + + + zerochaos@gentoo.org + Rick Farina + Also on the upstream team + + + netmon@gentoo.org + Gentoo network monitoring and analysis project + + + aircrack is a set of tools for auditing wireless networks. + aircrack-ng is the next generation of aircrack with lots of new features. + (from http://www.aircrack-ng.org) + + + Build airdrop-ng + Build airgraph-ng + Build the "experimental" tools which may randomly fail to run properly + Use netlink for channel control instead of WEXT + + + aircrack-ng/aircrack-ng + + diff --git a/net-wireless/lorcon/Manifest b/net-wireless/lorcon/Manifest new file mode 100644 index 000000000..c807ec446 --- /dev/null +++ b/net-wireless/lorcon/Manifest @@ -0,0 +1 @@ +DIST lorcon-2020.06.06_p20220216.tar.gz 506368 BLAKE2B 2881af0130f331b2f648c0d29b0d70516770b833ba18b5f9bf6d4eb9eaab2192034ecc840f5e2b323c0e0fb8737dd1e29525b237d95825d60e78e3200f4ac929 SHA512 3f7d5967a1af840f8f6f05872c06d908ce426e7827046b8d86267770da044b48973554ff7a0415756522332055496f00ad078fa6a25a1898d640c925834111ef diff --git a/net-wireless/lorcon/files/lorcon-2020.06.06_p20220216-C99-decls.patch b/net-wireless/lorcon/files/lorcon-2020.06.06_p20220216-C99-decls.patch new file mode 100644 index 000000000..9643c0f97 --- /dev/null +++ b/net-wireless/lorcon/files/lorcon-2020.06.06_p20220216-C99-decls.patch @@ -0,0 +1,20 @@ +--- a/drv_mac80211.c ++++ b/drv_mac80211.c +@@ -52,6 +52,7 @@ + #include "lorcon_int.h" + #include "lorcon_packasm.h" + #include "lorcon_endian.h" ++#include "iwcontrol.h" + + #ifndef IEEE80211_RADIOTAP_FLAGS + #define IEEE80211_RADIOTAP_FLAGS (1 << 1) +--- a/drv_madwifing.c ++++ b/drv_madwifing.c +@@ -48,6 +48,7 @@ + #include "ifcontrol_linux.h" + #include "madwifing_control.h" + #include "lorcon_int.h" ++#include "lorcon_packasm.h" + + /* Monitor, inject, and injmon are all the same method, make a new + * mwng VAP */ diff --git a/net-wireless/lorcon/lorcon-2020.06.06_p20220216-r3.ebuild b/net-wireless/lorcon/lorcon-2020.06.06_p20220216-r3.ebuild new file mode 100644 index 000000000..68a49de94 --- /dev/null +++ b/net-wireless/lorcon/lorcon-2020.06.06_p20220216-r3.ebuild @@ -0,0 +1,76 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..13} ) +DISTUTILS_OPTIONAL=1 + +inherit distutils-r1 flag-o-matic + +DESCRIPTION="A generic library for injecting 802.11 frames" +HOMEPAGE="https://github.com/kismetwireless/lorcon" + +if [[ ${PV} == *9999 ]] ; then + #main repo + #EGIT_REPO_URI="https://www.kismetwireless.net/lorcon.git" + #reliable mirror + EGIT_REPO_URI="https://github.com/kismetwireless/lorcon.git" + inherit git-r3 +else + GIT_HASH="4a81d6aaa2c6ac7253ecd182ffe97c6c89411196" + SRC_URI="https://github.com/kismetwireless/lorcon/archive/${GIT_HASH}.tar.gz -> ${P}.tar.gz" + S="${WORKDIR}"/"${PN}-${GIT_HASH}" + + KEYWORDS="amd64 arm ~arm64 ppc x86 ~amd64-linux ~x86-linux" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="python" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RDEPEND=" + dev-libs/libnl:3= + net-libs/libpcap + python? ( ${PYTHON_DEPS} )" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + python? ( ${DISTUTILS_DEPS} )" + +PATCHES=( "${FILESDIR}"/${P}-C99-decls.patch ) + +src_prepare() { + + if use python && use python_targets_python3_13; then + eerror "Python 3.13 is not supported by this version" + eerror "Please disable python use flag" + die + fi + + default + use python && distutils-r1_src_prepare +} + +src_compile() { + default + + if use python; then + append-ldflags "-L${S}/.libs/" + cd pylorcon2 || die + distutils-r1_src_compile + fi +} + +src_install() { + default + + if use python; then + cd pylorcon2 || die + distutils-r1_src_install + fi + + find "${ED}" -name '*.la' -delete || die +} diff --git a/net-wireless/lorcon/metadata.xml b/net-wireless/lorcon/metadata.xml new file mode 100644 index 000000000..9fa099aba --- /dev/null +++ b/net-wireless/lorcon/metadata.xml @@ -0,0 +1,11 @@ + + + + + zerochaos@gentoo.org + Rick Farina + + + kismetwireless/lorcon + +