Index: head/net-mgmt/aircrack-ng/Makefile =================================================================== --- head/net-mgmt/aircrack-ng/Makefile (revision 396827) +++ head/net-mgmt/aircrack-ng/Makefile (revision 396828) @@ -1,60 +1,56 @@ # Created by: Lars Engels # $FreeBSD$ PORTNAME= aircrack-ng DISTVERSION= 1.2-rc1 +PORTREVISION= 1 CATEGORIES= net-mgmt security MASTER_SITES= http://download.aircrack-ng.org/ \ http://bsd-geek.de/FreeBSD/distfiles/ MAINTAINER= lme@FreeBSD.org COMMENT= 802.11 WEP and WPA-PSK keys cracking program LICENSE= GPLv2 BSD3CLAUSE APACHE20 LICENSE_COMB= dual -USES= cpe gmake dos2unix +USES= cpe dos2unix gmake CPE_VERSION= ${DISTVERSION:C/-.*//} CPE_UPDATE= ${DISTVERSION:C/^[^-]*$//:C/.*-//} DOS2UNIX_FILES= src/osdep/byteorder.h MAKE_ARGS= unstable=true libnl=false prefix=${PREFIX} USE_OPENSSL= yes -SUB_FILES= pkg-message BIN_FILES= airdecloak-ng buddy-ng aircrack-ng airdecap-ng ivstools \ makeivs-ng packetforge-ng wpaclean kstats 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 - -.include - -.if ${PORT_OPTIONS:MSQLITE} -USE_SQLITE= yes -MAKE_ARGS+= SQLITE=true -BIN_FILES+= airolib-ng -.endif +SQLITE_USE= SQLITE=yes +SQLITE_MAKE_ARGS= SQLITE=true +SQLITE_CFLAGS= -I${LOCALBASE}/include +SQLITE_VARS= BIN_FILES+=airolib-ng post-patch: @${REINPLACE_CMD} \ -e 's|-I/usr/local|-I${LOCALBASE}|' \ -e 's|share/\(man/man[1-9]\)|\1|' \ -e 's|^CC[[:blank:]]*|&?|' \ -e 's|^AR[[:blank:]]*|&?|' \ ${WRKSRC}/common.mak # Do not install scripts (Linux-specific) and their manpages @${REINPLACE_CMD} \ -E '/scripts|@echo/d' \ ${WRKSRC}/Makefile @${REINPLACE_CMD} \ -E 's/air(driver|mon)-ng\.1 //' \ ${WRKSRC}/manpages/Makefile post-install: @${STRIP_CMD} ${BIN_FILES:S,^,${STAGEDIR}${PREFIX}/bin/,} \ ${SBIN_FILES:S,^,${STAGEDIR}${PREFIX}/sbin/,} .include Index: head/net-mgmt/aircrack-ng/files/pkg-message.in =================================================================== --- head/net-mgmt/aircrack-ng/files/pkg-message.in (revision 396827) +++ head/net-mgmt/aircrack-ng/files/pkg-message.in (nonexistent) @@ -1,10 +0,0 @@ -============================================================================== - -Due to the addition of virtual access points (VAP) in FreeBSD 8 you need to -create a new wlan device in monitor mode to use with airodump-ng. To do so, -issue the following command: - ifconfig ${VAP_INTERFACE} create wlandev ${INTERFACE} wlanmode monitor - -Then run airodump-ng(1) with the newly created interface ${VAP_INTERFACE}. - -============================================================================== Property changes on: head/net-mgmt/aircrack-ng/files/pkg-message.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/net-mgmt/aircrack-ng/files/patch-src_crypto.h =================================================================== --- head/net-mgmt/aircrack-ng/files/patch-src_crypto.h (revision 396827) +++ head/net-mgmt/aircrack-ng/files/patch-src_crypto.h (revision 396828) @@ -1,10 +1,10 @@ ---- src/crypto.h.orig 2014-07-12 04:24:03.000000000 +0200 -+++ src/crypto.h 2014-11-02 21:23:28.529312627 +0100 +--- src/crypto.h.orig 2014-07-12 02:24:03 UTC ++++ src/crypto.h @@ -34,6 +34,7 @@ #ifndef _CRYPTO_H #define _CRYPTO_H +#include #ifdef USE_GCRYPT #include "gcrypt-openssl-wrapper.h" Index: head/net-mgmt/aircrack-ng/files/patch-src_osdep_byteorder.h =================================================================== --- head/net-mgmt/aircrack-ng/files/patch-src_osdep_byteorder.h (revision 396827) +++ head/net-mgmt/aircrack-ng/files/patch-src_osdep_byteorder.h (revision 396828) @@ -1,22 +1,22 @@ ---- src/osdep/byteorder.h.orig 2013-03-04 18:32:55.000000000 +0100 -+++ src/osdep/byteorder.h 2013-09-29 13:48:25.382520852 +0200 +--- src/osdep/byteorder.h.orig 2015-09-07 17:11:56 UTC ++++ src/osdep/byteorder.h @@ -181,7 +181,7 @@ * Solaris * ------- */ - #if defined(__sparc__) && defined(__sun__) + #if defined(__sparc__) && defined(__SVR4) && defined(__sun__) #include #include #include @@ -223,7 +223,9 @@ // FreeBSD #ifdef __FreeBSD__ - #include + #undef ushort + #undef uint + #include #endif // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...? Index: head/net-mgmt/aircrack-ng/files/patch-src_osdep_freebsd.c =================================================================== --- head/net-mgmt/aircrack-ng/files/patch-src_osdep_freebsd.c (revision 396827) +++ head/net-mgmt/aircrack-ng/files/patch-src_osdep_freebsd.c (revision 396828) @@ -1,127 +1,71 @@ ---- src/osdep/freebsd.c.orig 2011-09-25 00:05:54.000000000 +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; - int pf_totlen; -+#if __FreeBSD_version > 700018 - struct ieee80211_bpf_params pf_txparams; -+#endif +--- src/osdep/freebsd.c.orig 2011-09-24 22:05:54 UTC ++++ src/osdep/freebsd.c +@@ -389,7 +389,7 @@ static int do_fbsd_open(struct wif *wi, - /* setchan */ - int pf_s; -@@ -280,13 +282,16 @@ static int fbsd_read(struct wif *wi, uns - static int fbsd_write(struct wif *wi, unsigned char *h80211, int len, - struct tx_info *ti) - { -+#if __FreeBSD_version > 700018 - struct iovec iov[2]; -+#endif - struct priv_fbsd *pf = wi_priv(wi); - int rc; - - /* XXX make use of ti */ - if (ti) {} - -+#if __FreeBSD_version > 700018 - iov[0].iov_base = &pf->pf_txparams; - iov[0].iov_len = pf->pf_txparams.ibp_len; - -@@ -294,12 +299,19 @@ static int fbsd_write(struct wif *wi, un - iov[1].iov_len = len; - - rc = writev(pf->pf_fd, iov, 2); -+#else -+ rc = write(pf->pf_fd, h80211, len); -+#endif - if (rc == -1) - return rc; -+#if __FreeBSD_version > 700018 - if (rc < (int) iov[0].iov_len) - return 0; - - return rc - iov[0].iov_len; -+#else -+ return 0; -+#endif - } - - static int fbsd_set_channel(struct wif *wi, int chan) -@@ -389,7 +401,7 @@ static int do_fbsd_open(struct wif *wi, - memset(&ifr, 0, sizeof(ifr)); strcpy(ifr.ifr_name, iface); - ifr.ifr_media = ifmr.ifm_current | IFM_IEEE80211_MONITOR; + ifr.ifr_media = ifmr.ifm_current; if (ioctl(s, SIOCSIFMEDIA, &ifr) == -1) goto close_sock; -@@ -510,6 +522,39 @@ static int fbsd_set_mac(struct wif *wi, +@@ -510,6 +510,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 +@@ -530,7 +563,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); +@@ -544,6 +579,8 @@ static struct wif *fbsd_open(char *iface pf->pf_fd = fd; -+#if __FreeBSD_version > 700018 pf->pf_txparams.ibp_vers = IEEE80211_BPF_VERSION; pf->pf_txparams.ibp_len = sizeof(struct ieee80211_bpf_params) - 6; + pf->pf_txparams.ibp_rate0 = 2; /* 1 MB/s XXX */ + pf->pf_txparams.ibp_try0 = 1; /* no retransmits */ pf->pf_txparams.ibp_rate1 = 2; /* 1 MB/s XXX */ pf->pf_txparams.ibp_try1 = 1; /* no retransmits */ pf->pf_txparams.ibp_flags = IEEE80211_BPF_NOACK; - pf->pf_txparams.ibp_power = 100; /* nominal max */ - pf->pf_txparams.ibp_pri = WME_AC_VO; /* high priority */ -+#endif - - return wi; - } Index: head/net-mgmt/aircrack-ng/files/patch-src_osdep_radiotap_platform.h =================================================================== --- head/net-mgmt/aircrack-ng/files/patch-src_osdep_radiotap_platform.h (revision 396827) +++ head/net-mgmt/aircrack-ng/files/patch-src_osdep_radiotap_platform.h (revision 396828) @@ -1,11 +1,11 @@ ---- src/osdep/radiotap/platform.h.orig 2014-04-01 19:18:03.439632822 +0200 -+++ src/osdep/radiotap/platform.h 2014-04-01 19:18:19.900626663 +0200 +--- src/osdep/radiotap/platform.h.orig 2014-03-22 20:26:59 UTC ++++ src/osdep/radiotap/platform.h @@ -3,7 +3,7 @@ #ifndef _BSD_SOURCE #define _BSD_SOURCE #endif -#include +#include #define le16_to_cpu le16toh #define le32_to_cpu le32toh Index: head/net-mgmt/aircrack-ng/files/patch-src_osdep_radiotap_radiotap.c =================================================================== --- head/net-mgmt/aircrack-ng/files/patch-src_osdep_radiotap_radiotap.c (revision 396827) +++ head/net-mgmt/aircrack-ng/files/patch-src_osdep_radiotap_radiotap.c (revision 396828) @@ -1,19 +1,19 @@ ---- src/osdep/radiotap/radiotap.c.orig 2014-04-01 19:20:56.379623336 +0200 -+++ src/osdep/radiotap/radiotap.c 2014-04-01 19:22:54.880614337 +0200 +--- src/osdep/radiotap/radiotap.c.orig 2014-03-31 01:39:15 UTC ++++ src/osdep/radiotap/radiotap.c @@ -19,6 +19,16 @@ #include "../byteorder.h" #endif +#ifdef _BSD_SOURCE +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define le16toh(x) (x) +#define le32toh(x) (x) +#else +#define le32toh(x) bswap_32 (x) +#endif +#endif + + /* function prototypes and related defs are in radiotap_iter.h */ static const struct radiotap_align_size rtap_namespace_sizes[] = {