summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory A. Pratt <anarchy@gentoo.org>2018-06-18 11:09:00 -0500
committerJory A. Pratt <anarchy@gentoo.org>2018-06-18 11:09:00 -0500
commita3037f9dd5009cd38e02e4a82968b778e3283e11 (patch)
tree1491be25db39ce0ac5162c66aae937a67139d164
parentdev-util/cargo,net-libs/webkit-gtk: remove from overlay use in tree (diff)
downloadanarchy-a3037f9dd5009cd38e02e4a82968b778e3283e11.tar.gz
anarchy-a3037f9dd5009cd38e02e4a82968b778e3283e11.tar.bz2
anarchy-a3037f9dd5009cd38e02e4a82968b778e3283e11.zip
net-wireless/{aircrack-ng,lorcon}: add support for libressl to
aircrack-ng, fix missing header in lorcon.
-rw-r--r--net-wireless/aircrack-ng/Manifest4
-rw-r--r--net-wireless/aircrack-ng/aircrack-ng-1.2.ebuild132
-rw-r--r--net-wireless/aircrack-ng/files/aircrack-ng-1.2-no-force-stack-protector.patch50
-rw-r--r--net-wireless/aircrack-ng/metadata.xml29
-rw-r--r--net-wireless/lorcon/Manifest4
-rw-r--r--net-wireless/lorcon/files/0001-Add-missing-sys-types.h.patch26
-rw-r--r--net-wireless/lorcon/lorcon-0.0_p20150109.ebuild75
-rw-r--r--net-wireless/lorcon/metadata.xml8
8 files changed, 328 insertions, 0 deletions
diff --git a/net-wireless/aircrack-ng/Manifest b/net-wireless/aircrack-ng/Manifest
new file mode 100644
index 0000000..b2760ba
--- /dev/null
+++ b/net-wireless/aircrack-ng/Manifest
@@ -0,0 +1,4 @@
+AUX aircrack-ng-1.2-no-force-stack-protector.patch 2245 BLAKE2B a7f200711a4e24cc92d4626d24c62abe11a2d378e8876a801a516aa2023b7aa7566c868e890186cebf9dacecc59037b23c39380b1b435b0f0985a02f939ccfec SHA512 35e5f717bc3b90507a879bbd4ffd3bb88c7bc98676abac1241cbc50dbb1bcf2c53e5c45514b643d7ad7d86d0b74e662803de155ae6bbf430a1fdb32e50682068
+DIST aircrack-ng-1.2.tar.gz 4517658 BLAKE2B 1a3d17608dafe69a7a500526807310bf9ae8f0f14ed4198d06fc1cd6287fa25aeed996bad85c82b9ed87c214951e2bbc73384513361b7e8ce6ba05ef32f6530c SHA512 efc8cd17994fd74dcdd60e4ff26f81dc4f090a368668c2b1d62e204d2a9c001f2614a9d2ad0e4ae0ae38fb71e1957e0342f8216d757e38db105b1e467de82bd9
+EBUILD aircrack-ng-1.2.ebuild 3206 BLAKE2B d1655e41e3aa7fa613411f305e4cef7ce317c5939643112060818923ff4798c9bb922d8048c370ce366090a17f9f6745d08ec49164a0f220d079858b7795adb4 SHA512 dd35fff5754dd1c7492f10c7bcbef8db317883b5b062d7b6fad290051c3b89de29e752c91b8a2e7cf2d6097586091dc473f6d62df66c7ceaa45e53cb56ec4f84
+MISC metadata.xml 1130 BLAKE2B 9d3c0463a4a1cf4360ce77c550a701a805cd3db5f06ee895aa8888180246d6b51970d23b74b723a241e09bb6dde426055ca8f1288afffa90e8e4abc7d9c4b92a SHA512 0ca935ebf651d221657fda9320fc8a8f8dbabd9d10fc4eebb8b301b63ca8f9316069bee16b2468d227ea5acf53a28747c8479eb776983334b9496d68fefa76ee
diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.2.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.2.ebuild
new file mode 100644
index 0000000..0d65ac9
--- /dev/null
+++ b/net-wireless/aircrack-ng/aircrack-ng-1.2.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit toolchain-funcs distutils-r1 flag-o-matic 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"
+ KEYWORDS=""
+else
+ MY_PV=${PV/_/-}
+ SRC_URI="http://download.${PN}.org/${PN}-${MY_PV}.tar.gz"
+ KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+ S="${WORKDIR}/${PN}-${MY_PV}"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+
+IUSE="+airdrop-ng +airgraph-ng kernel_linux kernel_FreeBSD +netlink +pcre +sqlite +experimental"
+
+DEPEND="net-libs/libpcap
+ || ( dev-libs/openssl:0=
+ dev-libs/libressl )
+ 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 )"
+RDEPEND="${DEPEND}"
+PDEPEND="kernel_linux? (
+ net-wireless/iw
+ net-wireless/wireless-tools
+ sys-apps/ethtool
+ sys-apps/usbutils
+ sys-apps/pciutils )
+ sys-apps/hwids
+ airdrop-ng? ( net-wireless/lorcon[python,${PYTHON_USEDEP}] )"
+
+REQUIRED_USE="airdrop-ng? ( ${PYTHON_REQUIRED_USE} )
+ airgraph-ng? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ MAKE_COMMON=(
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ LD="$(tc-getLD)" \
+ RANLIB="$(tc-getRANLIB)" \
+ DESTDIR="${ED}"
+ )
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/aircrack-ng-1.2-no-force-stack-protector.patch
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf \
+ --disable-asan \
+ $(use_enable netlink libnl) \
+ $(use_with experimental) \
+ $(use_with sqlite sqlite3) \
+ --enable-shared \
+ --disable-static \
+ --without-opt
+}
+
+src_compile() {
+ if [[ $($(tc-getCC) --version) == clang* ]] ; then
+ #https://bugs.gentoo.org/show_bug.cgi?id=472890
+ filter-flags -frecord-gcc-switches
+ fi
+
+ emake "${MAKE_COMMON[@]}"
+
+ if use airgraph-ng; then
+ cd "${S}/scripts/airgraph-ng"
+ distutils-r1_src_compile
+ fi
+ if use airdrop-ng; then
+ cd "${S}/scripts/airdrop-ng"
+ distutils-r1_src_compile
+ fi
+}
+
+src_test() {
+ emake "${MAKE_COMMON[@]}" check
+}
+
+src_install() {
+ einstalldocs
+ emake "${MAKE_COMMON[@]}" install
+
+ if use airgraph-ng; then
+ cd "${S}/scripts/airgraph-ng"
+ distutils-r1_src_install
+ fi
+ if use airdrop-ng; then
+ cd "${S}/scripts/airdrop-ng"
+ 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
+}
+
+pkg_postinst() {
+ # Message is (c) FreeBSD
+ # http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/pkg-message.in?rev=1.5
+ if use kernel_FreeBSD ; then
+ einfo "Contrary to Linux, it is not necessary to use airmon-ng to enable the monitor"
+ einfo "mode of your wireless card. So do not care about what the manpages say about"
+ einfo "airmon-ng, airodump-ng sets monitor mode automatically."
+ echo
+ einfo "To return from monitor mode, issue the following command:"
+ einfo " ifconfig \${INTERFACE} -mediaopt monitor"
+ einfo
+ einfo "For aireplay-ng you need FreeBSD >= 7.0."
+ fi
+}
diff --git a/net-wireless/aircrack-ng/files/aircrack-ng-1.2-no-force-stack-protector.patch b/net-wireless/aircrack-ng/files/aircrack-ng-1.2-no-force-stack-protector.patch
new file mode 100644
index 0000000..d4688b8
--- /dev/null
+++ b/net-wireless/aircrack-ng/files/aircrack-ng-1.2-no-force-stack-protector.patch
@@ -0,0 +1,50 @@
+From 58fe40daf3e082d9e63d689d795a3bbecf72fedb Mon Sep 17 00:00:00 2001
+From: Joseph Benden <joe@benden.us>
+Date: Mon, 16 Apr 2018 11:26:23 -0700
+Subject: [PATCH] autotools: The flag --without-opt should skip stack protector
+ flags. (#1864)
+
+---
+ build/m4/aircrack_ng_compiler.m4 | 28 ++++++++++++++++------------
+ 1 file changed, 16 insertions(+), 12 deletions(-)
+
+diff --git a/build/m4/aircrack_ng_compiler.m4 b/build/m4/aircrack_ng_compiler.m4
+index 0fb19726..8a973dbf 100644
+--- a/build/m4/aircrack_ng_compiler.m4
++++ b/build/m4/aircrack_ng_compiler.m4
+@@ -108,19 +108,23 @@ case "$ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor" in
+ CYGWIN*|MSYS*|cygwin*|msys*)
+ ;;
+ *)
+- AS_IF([test "x$gcc_over49" = "xno"], [
+- AS_IF([test "x$gcc_over41" = "xyes"], [
+- AX_CHECK_COMPILE_FLAG([-fstack-protector], [
+- AX_APPEND_FLAG(-fstack-protector, [opt_[]_AC_LANG_ABBREV[]flags])
+- ])
+- ], [])
+- ], [])
++ case $with_opt in
++ yes | "")
++ AS_IF([test "x$gcc_over49" = "xno"], [
++ AS_IF([test "x$gcc_over41" = "xyes"], [
++ AX_CHECK_COMPILE_FLAG([-fstack-protector], [
++ AX_APPEND_FLAG(-fstack-protector, [opt_[]_AC_LANG_ABBREV[]flags])
++ ])
++ ], [])
++ ], [])
+
+- AS_IF([test "x$gcc_over49" = "xyes"], [
+- AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [
+- AX_APPEND_FLAG(-fstack-protector-strong, [opt_[]_AC_LANG_ABBREV[]flags])
+- ])
+- ], [])
++ AS_IF([test "x$gcc_over49" = "xyes"], [
++ AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [
++ AX_APPEND_FLAG(-fstack-protector-strong, [opt_[]_AC_LANG_ABBREV[]flags])
++ ])
++ ], [])
++ ;;
++ esac
+ ;;
+ esac
+ ;;
diff --git a/net-wireless/aircrack-ng/metadata.xml b/net-wireless/aircrack-ng/metadata.xml
new file mode 100644
index 0000000..7e8481f
--- /dev/null
+++ b/net-wireless/aircrack-ng/metadata.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+ <email>zerochaos@gentoo.org</email>
+ <name>Rick Farina</name>
+ <description>Also on the upstream team</description>
+</maintainer>
+<maintainer type="project">
+ <email>netmon@gentoo.org</email>
+ <name>Gentoo network monitoring and analysis project</name>
+</maintainer>
+<maintainer type="project">
+ <email>crypto@gentoo.org</email>
+ <name>Crypto</name>
+</maintainer>
+<longdescription>
+ 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)
+</longdescription>
+<use>
+ <flag name="airdrop-ng">Build airdrop-ng</flag>
+ <flag name="airgraph-ng">Build airgraph-ng</flag>
+ <flag name="experimental">Build the "experimental" tools which may randomly fail to run properly</flag>
+ <flag name="netlink">Use netlink for channel control instead of WEXT</flag>
+ <flag name="unstable">Build the "unstable" tools which may randomly fail to run properly</flag>
+</use>
+</pkgmetadata>
diff --git a/net-wireless/lorcon/Manifest b/net-wireless/lorcon/Manifest
new file mode 100644
index 0000000..e86a6ef
--- /dev/null
+++ b/net-wireless/lorcon/Manifest
@@ -0,0 +1,4 @@
+AUX 0001-Add-missing-sys-types.h.patch 835 BLAKE2B a5330be7505cdc7db521ed8149dd3b36325df05ba3edc70ae8004f573e70ec2093c2c00fe78bff8094b48a9bceb7b3efdc65d14839cef0b4a6a9c760145ed7d2 SHA512 698b251d809eecc51b01e8117b95c0c1346a60f8a4d08b95592545a4284afaea2dae7fbb6d356fe1d8533d2ab1513fb1e69b3755b3f0575dab27786c7d454903
+DIST lorcon-0.0_p20150109.tar.xz 259788 BLAKE2B e3bd188642f7ef49fa3b7361bd659fdd47d6449598b5248412ad3d8e85e5d0b9c0f8d73fdcd3d0822f19a0d069bf0eeb832bed7bb38c418970d617c03387d1ce SHA512 acbd88477317475ca8555d579a1483ea5e5d9eac0f86ef7bde2592e007025070ca56c6cd43e814560e28165ac7b40bd86f2703a466faeca1619b8373dc2b625b
+EBUILD lorcon-0.0_p20150109.ebuild 1399 BLAKE2B 95285b7a8a94be649324e7c7c97dfdc8268c9b48eb99f3d1859943d38e4a9ab42ddcd5496e2a382163ef99d978ac623b195f0c89ccc09412c17246e2d4e418a8 SHA512 d87f5c602e704c9f96299c4e1ab89c7c7ffa990514d2f3b49a2aa95e70c4324f4894d8c59b1810278ea9f903036bf24335da54a9a51b2d37b5b04389b312f641
+MISC metadata.xml 241 BLAKE2B 31d2e88c810d3facda6587f93bdc429e66b6ed90dc2c019dac1ece6da620b74dc4db8907a25d6559ff7a027f6b267774016686a56c5a5e67da4fbfa3cae7be6e SHA512 d308ccef737c1776c2d77c0761996ef272a5866f5d9ceeda4dd4ceede851a145f76281a29b4c4b154e5b10f1d57c9344010bfcf75ba52fb3f1b34a58e3c2053f
diff --git a/net-wireless/lorcon/files/0001-Add-missing-sys-types.h.patch b/net-wireless/lorcon/files/0001-Add-missing-sys-types.h.patch
new file mode 100644
index 0000000..3387149
--- /dev/null
+++ b/net-wireless/lorcon/files/0001-Add-missing-sys-types.h.patch
@@ -0,0 +1,26 @@
+From 6e12927f734355f3f038719eba3fe068073b4b1b Mon Sep 17 00:00:00 2001
+From: "Jory A. Pratt" <anarchy@gentoo.org>
+Date: Tue, 12 Jun 2018 21:33:54 -0500
+Subject: [PATCH] Add missing sys/types.h
+
+Signed-off-by: Jory A. Pratt <anarchy@gentoo.org>
+---
+ lorcon_packasm.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lorcon_packasm.h b/lorcon_packasm.h
+index 4dc91e7..a2fd4a3 100644
+--- a/lorcon_packasm.h
++++ b/lorcon_packasm.h
+@@ -155,6 +155,8 @@ void lcpa_free(struct lcpa_metapack *in_head);
+ /* Get the size of an assembled LCPA packet */
+ int lcpa_size(struct lcpa_metapack *in_head);
+
++#include <sys/types.h>
++
+ /* Freeze a LCPA fragment packet into a bytestream. The caller is responsible
+ * for providing a bytestream of sufficient length. */
+ void lcpa_freeze(struct lcpa_metapack *in_head, u_char *bytes);
+--
+2.17.1
+
diff --git a/net-wireless/lorcon/lorcon-0.0_p20150109.ebuild b/net-wireless/lorcon/lorcon-0.0_p20150109.ebuild
new file mode 100644
index 0000000..a71f624
--- /dev/null
+++ b/net-wireless/lorcon/lorcon-0.0_p20150109.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+DISTUTILS_OPTIONAL=1
+
+inherit distutils-r1
+
+DESCRIPTION="A generic library for injecting 802.11 frames"
+HOMEPAGE="http://802.11ninja.net/lorcon"
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="https://code.google.com/p/lorcon/"
+ inherit git-r3
+ KEYWORDS=""
+else
+ SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.xz"
+ KEYWORDS="amd64 arm ppc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="python"
+
+DEPEND="
+ python? ( ${PYTHON_DEPS} )
+ dev-libs/libnl:3=
+ net-libs/libpcap"
+RDEPEND="${DEPEND}"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S="${WORKDIR}"/${P}
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git-r3_src_unpack
+ cp -R "${S}/" "${WORKDIR}/all"
+ fi
+ default_src_unpack
+ cd ${S}
+ epatch "${FILESDIR}/0001-Add-missing-sys-types.h.patch"
+}
+
+src_prepare() {
+ sed -i 's#<lorcon2/lorcon.h>#"../lorcon.h"#' pylorcon2/PyLorcon2.c
+ use python && distutils-r1_src_prepare
+}
+
+src_configure() {
+ default_src_configure
+}
+
+src_compile() {
+ default_src_compile
+ if use python; then
+ LDFLAGS+=" -L${S}/.libs/"
+ cd pylorcon2 || die
+ distutils-r1_src_compile
+ fi
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+ if use python; then
+ cd pylorcon2 || die
+ distutils-r1_src_install
+ fi
+}
+
+src_test() {
+ :
+}
diff --git a/net-wireless/lorcon/metadata.xml b/net-wireless/lorcon/metadata.xml
new file mode 100644
index 0000000..0bd1717
--- /dev/null
+++ b/net-wireless/lorcon/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="person">
+<email>zerochaos@gentoo.org</email>
+<name>Rick Farina</name>
+</maintainer>
+</pkgmetadata>