diff options
author | Lars Engels <lme@FreeBSD.org> | 2013-12-20 16:41:26 +0000 |
---|---|---|
committer | Lars Engels <lme@FreeBSD.org> | 2013-12-20 16:41:26 +0000 |
commit | 6ff46fa5158fab7ee6bdc9800dcc6aa06cdeab60 (patch) | |
tree | 1a1ad027382128397e9d8b37db41c74a74080b6a /net-mgmt | |
parent | 58e7e23b2344414b1fc34b57f1016fc02bf4edc8 (diff) | |
download | ports-6ff46fa5158fab7ee6bdc9800dcc6aa06cdeab60.tar.gz ports-6ff46fa5158fab7ee6bdc9800dcc6aa06cdeab60.zip |
Notes
Diffstat (limited to 'net-mgmt')
-rw-r--r-- | net-mgmt/aircrack-ng/Makefile | 17 | ||||
-rw-r--r-- | net-mgmt/aircrack-ng/files/patch-src_osdep_freebsd.c | 55 |
2 files changed, 70 insertions, 2 deletions
diff --git a/net-mgmt/aircrack-ng/Makefile b/net-mgmt/aircrack-ng/Makefile index 8a1f5b722c84..7d728d81661f 100644 --- a/net-mgmt/aircrack-ng/Makefile +++ b/net-mgmt/aircrack-ng/Makefile @@ -3,6 +3,7 @@ PORTNAME= aircrack-ng DISTVERSION= 1.2b2 +PORTREVISION= 1 CATEGORIES= net-mgmt security MASTER_SITES= http://download.aircrack-ng.org/ \ http://bsd-geek.de/FreeBSD/distfiles/ @@ -11,12 +12,20 @@ DISTNAME= ${PORTNAME}-${DISTVERSION:C/b/-beta/} MAINTAINER= lme@FreeBSD.org COMMENT= An 802.11 WEP and WPA-PSK keys cracking program +LICENSE= GPLv2 BSD3CLAUSE AL2 +LICENSE_COMB= dual + USES= gmake dos2unix DOS2UNIX_FILES= src/osdep/byteorder.h MAKE_ARGS+= unstable=true prefix=${PREFIX} USE_OPENSSL= yes SUB_FILES= pkg-message +BIN_FILES= airdecloak-ng buddy-ng aircrack-ng airdecap-ng ivstools \ + airolib-ng makeivs-ng packetforge-ng wpaclean kstats do +SBIN_FILES= airtun-ng besside-ng airbase-ng easside-ng airodump-ng \ + aireplay-ng wesside-ng airserv-ng tkiptun-ng + OPTIONS_DEFINE= SQLITE OPTIONS_SUB= yes SQLITE_DESC= Use SQLite for storing pre-computed key tables @@ -52,5 +61,13 @@ post-patch: @${REINPLACE_CMD} \ -e 's|-lpthread|${PTHREAD_LIBS}|' \ ${WRKSRC}/src/Makefile +post-install: +.for f in ${BIN_FILES} + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/$f +.endfor + +.for f in ${SBIN_FILES} + @${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/$f +.endfor .include <bsd.port.mk> diff --git a/net-mgmt/aircrack-ng/files/patch-src_osdep_freebsd.c b/net-mgmt/aircrack-ng/files/patch-src_osdep_freebsd.c index 29ba88bb4a34..6e736b107ad8 100644 --- a/net-mgmt/aircrack-ng/files/patch-src_osdep_freebsd.c +++ b/net-mgmt/aircrack-ng/files/patch-src_osdep_freebsd.c @@ -1,5 +1,5 @@ --- src/osdep/freebsd.c.orig 2011-09-25 00:05:54.000000000 +0200 -+++ src/osdep/freebsd.c 2013-09-29 13:49:18.588462319 +0200 ++++ src/osdep/freebsd.c 2013-12-20 17:15:28.184126473 +0100 @@ -53,7 +53,9 @@ struct priv_fbsd { unsigned char pf_buf[4096]; unsigned char *pf_next; @@ -56,7 +56,58 @@ if (ioctl(s, SIOCSIFMEDIA, &ifr) == -1) goto close_sock; -@@ -542,13 +554,17 @@ static struct wif *fbsd_open(char *iface +@@ -510,6 +522,39 @@ static int fbsd_set_mac(struct wif *wi, + return ioctl(priv->pf_s, SIOCSIFLLADDR, ifr); + } + ++static int fbsd_set_mtu(struct wif *wi, int mtu) ++{ ++ struct priv_fbsd *priv = wi_priv(wi); ++ struct ifreq *ifr = &priv->pf_ifr; ++ ++ memset(ifr, 0, sizeof(struct ifreq)); ++ ++ strncpy(ifr->ifr_name, wi_get_ifname(wi), sizeof(ifr->ifr_name)); ++ ifr->ifr_mtu = mtu; ++ ++ if(ioctl(priv->pf_s, SIOCSIFMTU, ifr) < 0) ++ return -1; ++ ++ return 0; ++} ++ ++static int fbsd_get_mtu(struct wif *wi) ++{ ++ struct priv_fbsd *priv = wi_priv(wi); ++ struct ifreq ifr; ++ ++ memset(&ifr, 0, sizeof(struct ifreq)); ++ ++ ifr.ifr_addr.sa_family = AF_INET; ++ ++ strncpy(ifr.ifr_name, wi_get_ifname(wi), sizeof(ifr.ifr_name)); ++ ++ if(ioctl(priv->pf_s, SIOCGIFMTU, (caddr_t)&ifr) < 0) ++ return -1; ++ ++ return ifr.ifr_mtu; ++} ++ + static struct wif *fbsd_open(char *iface) + { + struct wif *wi; +@@ -530,7 +575,9 @@ static struct wif *fbsd_open(char *iface + wi->wi_set_mac = fbsd_set_mac; + wi->wi_get_rate = fbsd_get_rate; + wi->wi_set_rate = fbsd_set_rate; +- wi->wi_get_monitor = fbsd_get_monitor; ++ wi->wi_get_monitor = fbsd_get_monitor; ++ wi->wi_get_mtu = fbsd_get_mtu; ++ wi->wi_set_mtu = fbsd_set_mtu; + + /* setup iface */ + fd = do_fbsd_open(wi, iface); +@@ -542,13 +589,17 @@ static struct wif *fbsd_open(char *iface /* setup private state */ pf = wi_priv(wi); pf->pf_fd = fd; |